GetOAuthAccessToken
Fetches the OAuth Access Token, which is used to authenticate and authorize API calls made to Smartsheet.
Stored Procedure Specific Information
To execute this stored procedure, you must specify at least the OAuthClientId and OAuthClientSecret connection properties.
Additionally, you should also make sure the CallbackURL connection property or the 'CallbackUrl' input parameter matches with the 'App redirect URL' configured in your OAuth App Profile.
Input
| Name | Type | Required | Description |
| AuthMode | String | False | Specifies the type of authentication flow to use. Choose 'App' for a desktop-based authentication flow via a Windows forms app, or 'Web' for a browser-based flow via a web app.
The allowed values are APP, WEB. The default value is APP. |
| Scope | String | False | Defines the specific permissions or access levels your application is requesting from Smartsheet. Examples include read-only access or full administrative access. |
| CallbackUrl | String | False | The URL to which the user will be redirected after authorizing your application. This must exactly match the Redirect URL specified in your Smartsheet app settings. Required only when 'AuthMode' is set to 'Web'. |
| Verifier | String | False | A unique code provided by Smartsheet after the user authorizes your app. This value is included as a parameter in the callback URL to confirm the authorization. |
| State | String | False | A unique string generated by your application to maintain state between the authorization request and callback. Helps protect against cross-site request forgery (CSRF) attacks. |
Result Set Columns
| Name | Type | Description |
| OAuthAccessToken | String | The OAuth Access Token issued by Smartsheet for authenticated API calls. Use this token to access resources on behalf of the user. |
| OAuthRefreshToken | String | The OAuth Refresh Token issued by Smartsheet, which can be used to obtain a new access token without requiring user interaction. |
| ExpiresIn | String | The duration, in seconds, before the access token expires and needs to be refreshed using the refresh token. |