Skip to main content

oauth

oauth --credential [credential name]
oauth
--auth.tokenHost "https://api.twitter.com"
--auth.tokenPath "/oauth2/token"
--client.id "{API Key}"
--client.secret "{API Key Secret}"
--grant "clientcred"

Client authentication for the OAuth 2.0 authorization framework.

examples:

Query

oauth
--auth.tokenHost "https://api.twitter.com"
--auth.tokenPath "/oauth2/token"
--client.id "{API Key}"
--client.secret "{API Key Secret}"
--grant "clientcred"

Query

oauth
--auth.tokenHost "https://ssl.reddit.com"
--auth.tokenPath "/api/v1/access_token"
--client.id "{personal use script}"
--client.secret "{secret}"
--grant "clientcred"

flags:

--appendStage

Used to append the results from a previous stage to the current stage. (provide a label, stage index, or boolean true to append the previous results)

--auth.tokenHost

Base URL used to obtain access tokens (required)

--auth.tokenPath

URL path to obtain access tokens (See url resolution notes). Defaults to /oauth/token

--cache

A boolean value of true/false that determines whether or not to use the cache. Generally most commands will default to true.

--checkpoint

Format: "{CHECKPOINT NAME}:{COLUMN}" Used to store the value of the provided column (in the first row of results) in the provided name for use as a checkpoint in scheduled queries or other stages. Can be accessed using $CHECKPOINTS.{CHECKPOINT NAME}$

--client.id

Service registered client id. When required by the spec this value will be automatically encoded (required).

--client.secret

Service registered client secret. When required by the spec this value will be automatically encoded (required).

--credential

Provider reference stored in vault (HIGHLY RECOMMENDED). Contains the provider and auth related information.

--enrich

Enriches each result row with the previous row. The previous columns will be appended with a _previous.

--filter

A filter to run on the command results before completing the command. If not provided, no filter is run on the results.

--fresh

Starts the stage as if it was a fresh query, so will not use any previous result.

--gcp.keyfile

Google Cloud (GCP) JSON keyfile content.

--grant

clientcred|password|authcode|gcpjwt

clientcred: Client Credentials Grant The Client Credentials <https://oauth.net/2/grant-types/client-credentials/> grant type is used by clients to obtain an access token outside of the context of a user. This is typically used by clients to access resources about themselves rather than to access a user's resources.

password: Resource Owner Password Credentials Grant The Resource Owner Password Credentials <https://oauth.net/2/grant-types/password/> grant type is a way to exchange a user's credentials for an access token. Because the client application has to collect the user's password and send it to the authorization server, it is not recommended that this grant be used at all anymore.

authcode: Authorization Code Grant The Authorization Code <https://oauth.net/2/grant-types/authorization-code/> grant type is used by confidential and public clients to exchange an authorization code for an access token. After the user returns to the client via the redirect URL, the application will get the authorization code from the URL and use it to request an access token.

gcpjwt: Google Cloud (GCP) JWT How an application can complete server-to-server authentication using OAuth 2.0 for Google APIs.

--guid

Adds a populated random guid column.

--labelStage

Used to label a stage with a user provided label.

--maxConcurrent

Override for the system max concurrent workers for a stage.

--passwordgrant.password

User password (required for password grant).

--passwordgrant.username

User identifier (required for password grant).

--randomizeHash

Randomizes the stage hash, even if args and flags are the same.

--scope

String or array including a subset of the original client scopes to request.

--stats

Controls if a stats calculation is run on a stage after it completes.

--table

A comma separated list of columns to include in the command results. If not provided, all columns will be included.

--while

Will rerun the stage until the provided expression is valid for the first line of results.

support

AMI_ENTERPRISE AMI_FREE AMI_PRO BINARY_ENTERPRISE BINARY_FREE BINARY_PRO DESKTOP_ENTERPRISE DESKTOP_FREE DESKTOP_PRO DOCKER_ENTERPRISE DOCKER_FREE DOCKER_PRO