GetOAuthAccessToken
Gets an OAuth access token from Sage X3 Cloud using Client Credentials flow.
Stored Procedure-Specific Information
This procedure retrieves an OAuth 2.0 access token from Sage X3 Cloud using the Client Credentials flow. Use it to obtain a token without going through the interactive OAuth flow.To retrieve an access token, provide your OAuth client credentials and the token endpoint URL:
EXEC GetOAuthAccessToken OAuthAccessTokenUrl='https://your-auth-domain/oauth/token',
OAuthClientId='your-client-id',
OAuthClientSecret='your-client-secret',
Audience='your-audience-value'
Input
| Name | Type | Description |
| OAuthAccessTokenUrl | String | The OAuth token endpoint URL (e.g., https://auth-domain/oauth/token). |
| OAuthClientId | String | The OAuth client ID for authentication. |
| OAuthClientSecret | String | The OAuth client secret for authentication. |
| Audience | String | The API audience for the token request. |
Result Set Columns
| Name | Type | Description |
| OAuthAccessToken | String | The OAuth access token. |
| ExpiresIn | String | The remaining lifetime on the access token. |
| TokenType | String | The type of returned token. |