Skip to main content

Custom

"The Client Credentials grant type is used by clients to obtain an access token outside of the context of a user."

Configuration​

Getting credentials​

If you do not already have a Client Id and Client Secret, you will first need to create them.

Also note the Token Retrieval URL. This URL is used to make a request to retrieve a tokenmm using the Client Id and Client Secret

Configuring Custom OAuth Credentials in crul​

Navigate to the credentials page in crul (top right corner menu -> credentials).

Click the "create" button.

Select "OAuth" from the type dropdown, then select "Custom" from the provider dropdown.

Give your credential a name.

Split the Token Retrieval URL into a Token Host and Token Path. For example, https://id.twitch.tv/oauth2/token would be split into https://id.twitch.tv (Token Host) and /oauth2/token (Token Path).

Copy the Token Host into the Token Host credentials form entry. Then copy the Token Path into the Token Path credentials form entry.

Copy the Client Id into the Client Id credentials form entry. Then copy the Client Secret into the Client Secret credentials form entry.

Test the credential by running the following query. You should see a populated token.access_token column in the results.

oauth --credential "{CREDENTIAL NAME}"