POST getAccessToken
POST /oauth2/token
Operation ID: getAccessToken. Tags: Authentication.
Returns an OAuth 2.0 token that's required for accessing other Spiff Reporting API endpoints.
To create a token, first generate a client ID and secret in Spiff Settings. See Get Started with Salesforce Spiff Reporting API.
Request body (required)
Media type: application/x-www-form-urlencoded. Schema: object.
client_id(string, required) The OAuth client ID generated in Spiff Settings.
Example:09ac18484c46fd23.client_secret(string, required) The OAuth client secret generated in Spiff Settings.
Example:226d8670a81c2cc743736f15ea6c97cd.audience(string, required) The API server where the token is used. This value must match the base URL of the Spiff Reporting API.
Example:http://{subdomain}.spiff.com/api/v1.grant_type(string, required) The type of OAuth access that's granted. This value must beclient_credentials.
Allowed values:client_credentials. Example:client_credentials.
Responses
- 201
The token was generated.
Media type:
application/json. Schema:object.success(boolean)
Example:true.access_token(string) The JWT token to use for authentication.
Example:eyJhbGciOiJIUzU.eyJ1c2VyX2lkIjoxMzUxMzg2ODAsImxvZ2luX2lkIjoxMzUxMzg2ODAsImNpZCI6IjA5YWMxODQ4NGM0NmZkMjMiLCJzY3AiOlsicmVwb3J0aW5nQXBpLkN1c3RvbVJlcG9ydEV4cG9ydCJdLCJzZXJpYWwiOiI5NzE2NjA4ZWRiZDFmODJhYjM0MzQxNjIwMGRmMWJkMSIsImV4cCI6MTc0NjQ1OTEyMH0.2MgV9Q7_kG54t7KdJcCg90HM5SBnoQKzNOotKrctCXg9qlQ9x4_Wt5xPrhVC9yq-1YgTA8HNXo.token_type(string) The type of token issued.
Example:Bearer.expires_in(integer) The number of seconds until the token expires.
Example:604799.scope(string) The space-separated scopes granted to this token.
Example:reportingApi.CustomReportExport.
- 401
The request was unsuccessful because your client ID and client secret aren't valid.
Media type:
application/json. Schema:object.error(string)
Example:invalid_request.error_description(string)
Example:We couldn't validate your client ID and client secret credentials..