- Your application redirects the user to authenticate with their Smokeball credentials
- Upon successful authentication, Smokeball returns an authorization code to your redirect URI
- Your application exchanges this code for an access_token that can be used to make authenticated API requests
Request User Authorization
Direct the user tohttps://auth.smokeball.com/oauth2/authorize with the following parameters:
Example:
string
required
Must be set to “code” for Authorization Code flow.
Determines the OAuth 2.0 grant type being requested.
string
required
The client identifier issued during application registration.
Used to identify the application making the authorization request.
string
required
The URI where the authorization server will send the authorization code.
Must match one of the pre-registered redirect URIs.
string
An opaque value used to maintain state between request and callback.
Helps prevent CSRF attacks in the OAuth flow.This parameter is optional.
string
required
The scopes of access being requested, as a space-delimited list (for example
contacts/read matters/read matters/write).
Every scope requested must be assigned to your app in the Developer Console.OAuth 2.0 expects a client to state the scopes it wants, so always include this parameter.
The install URL shown on your app’s page in the Developer Console already includes every scope assigned to the app, sorted alphabetically, and updates as scopes are added or removed.
If the parameter is omitted the authorization server currently falls back to issuing a token with all scopes assigned to the app, but you should not rely on this behaviour.See AWS Cognito Authorization Endpoint Documentation for more information.
Request an Access Token
Once you have obtained an authorization code, you can now use it to get an access_token which may be used to make requests to the API. Make a POST request tohttps://auth.smokeball.com/oauth2/token with the following parameters and headers:
The Authorization header must be the string “Basic” followed by your client_id and client_secret with a colon : in between, Base64 Encoded. For example, client_id:client_secret is Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=Sample Response
string
A token used to obtain a new access token when the current one expires.By default, the returned refresh_token is valid for 180 days. If you require a longer expiration period, please contact us to discuss your specific needs.
The 180-day expiry took effect on 24 August 2026 and applies to refresh tokens issued on or after that date.
Refresh tokens issued before then remain valid for 30 days.
string
The access token used to authenticate API requests.By default, the returned access_token is valid for 60 minutes.
string
The type of token issued (typically
"Bearer").Indicates how the token should be presented in API requests.number
The lifetime of the access token in seconds.After expiration, a new token must be obtained.
Important: The refresh token expiry is not returned in the above response. Your application is responsible for monitoring the expiration of the refresh token and prompting the user to re-authenticate when it expires. This ensures continuous access to the application without interruptions. See AWS Cognito Token Endpoint Documentation for more information
PKCE (Proof Key for Code Exchange)
PKCE is an extension of the Authorization Code Grant flow, designed for mobile and single-page applications where storing a client secret securely is difficult. It ensures a more secure flow by requiring a dynamically generated code verifier and code challenge. It is recommended that all authorization code flows are authorized using PKCE and it is required for all public api clients, which do not have a client secret.Generate a Code Verifier and Code Challenge
To initiate the PKCE flow, you must generate a code_verifier, which is a random string, and a code_challenge, which is derived by hashing the code_verifier using SHA-256 and then Base64-URL encoding it.Request Authorization Code for Access Token
Direct the user tohttps://auth.smokeball.com/oauth2/authorize with the following parameters:
string
required
Must be set to “code” for Authorization Code flow.Determines the OAuth 2.0 grant type being requested.
string
required
The client identifier issued during application registration.Used to identify the application making the authorization request.
string
required
The URI where the authorization server will send the authorization code.Must match one of the pre-registered redirect URIs.
string
required
The PKCE code challenge derived from the code verifier.Generated using the S256 code challenge method.
string
required
The hash method used to generate the code challenge (must be “S256”).Ensures secure PKCE implementation for authorization flow.
string
An opaque value used to maintain state between request and callback.Helps prevent CSRF attacks in the OAuth flow.This parameter is optional.
string
required
The scopes of access being requested, as a space-delimited list (for example
contacts/read matters/read matters/write).
Every scope requested must be assigned to your app in the Developer Console.OAuth 2.0 expects a client to state the scopes it wants, so always include this parameter.
The install URL shown on your app’s page in the Developer Console already includes every scope assigned to the app, sorted alphabetically, and updates as scopes are added or removed.
If the parameter is omitted the authorization server currently falls back to issuing a token with all scopes assigned to the app, but you should not rely on this behaviour.S256 method is allowed for code_challenge_method
The user will be directed to the login page, and if authorized, redirected back with a code.
Exchange Authorization Code for Access Token
After receiving the authorization code, use it along with the code_verifier to request an access token:string
required
Must be set to “authorization_code” for this flow.Specifies the OAuth 2.0 grant type being used.
string
required
The client identifier issued during application registration.Must match the client_id used in the authorization request.
string
required
The authorization code received from the authorization server.This is the code obtained in the previous authorization step.
string
required
The same redirect URI that was used in the authorization request.Must exactly match the previous URI for security validation.
string
required
The original PKCE code verifier that was used to generate the code_challenge.Used to prove possession of the authorization code.
string
required
The client secret for confidential clients.Required if the client is configured with a secret.
Refreshing an Access Token
You can use the refresh_token returned in the previous request to continuously retrieve a valid access_token for use with the API. To exchange a refresh_token for an access_token, make the following request:string
required
Basic Authentication header containing base64-encoded
client_id:client_secret.Example: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=string
required
Must be
application/x-www-form-urlencoded for token endpoints.string
required
Must be
refresh_token for this flow.Determines the OAuth 2.0 grant type being used.string
required
The client identifier issued during registration.Must match the client ID used in the Basic Auth header.
string
required
Previously issued refresh token.Used to obtain new access tokens without re-authentication.
string
required
The access token used to authenticate API requests.By default, the returned access_token is valid for 60 minutes.
string
required
The type of token issued (typically
"Bearer").Indicates how the token should be presented in API requests.number
required
The lifetime of the access token in seconds.After expiration, a new token must be obtained.
See AWS Cognito User Pool OAuth 2.0 Grants for more information
Migrating from ID Tokens to Access Tokens
Using ID tokens (id_token) to make Smokeball API requests is deprecated. If your integration currently uses ID tokens for API requests, you must switch to access tokens (access_token) before December 2026.
What is changing?
Existing refresh tokens and ID tokens will continue to work, subject to their normal expiry and revocation conditions. However, for accounts connecting to your integration from December 2026 onwards, newly issued ID tokens may no longer be accepted for API requests. Complete the switch before December 2026 to avoid disruption for these accounts.How to migrate
-
Confirm your API scopes. Access tokens must include the permissions required by your integration. Review the scopes documentation and identify only the API scopes your integration needs.
- If your integration already has the required API scopes configured, you can proceed with the migration.
- If your scopes have not been configured, or you are unsure, contact us using the API scope request form. Provide your required scopes, or a list of the API endpoints and HTTP methods you use, so we can confirm the necessary permissions before you switch.
-
Update your authorisation requests if you explicitly pass a
scopequery parameter. If your requests tohttps://auth.smokeball.com/oauth2/authorizeincludescope, ensure it lists only the API scopes your integration requires, such asmatters/read, and removeopenid. If you do not pass ascopeparameter, no change is required for this step. -
Use the access token for API requests. Update your integration to use the
access_tokenreturned by the token endpoint instead of theid_token. - Test your integration. Confirm that your API requests work with access tokens and that the configured scopes cover all required functionality. Contact us if you encounter permission issues.
Important: Existing connections continuing to work does not mean your integration is ready for new connections from December 2026. Complete and test the switch to access tokens before then.