Authorization Code Flow
Last updated
Last updated
The Authorization Code Flow with PKCE is used for accessing an API on behalf of a customeruser. This flow requires the customeruser's consent to proceed and therefore cannot be used by backend-only systems without a user present. The authorization code flow can only be initiated once a customeruser has installed your app.
For each authorization code request, a unique code verifier and code challenge are generated. The code verifier is a cryptographically random string and the code challenge is the SHA-256 hash of the code verifier. Together these values are used in place of a client secret so that requests can be made by public clients.
For more information see the .
response_type
code
client_id
Your app's client ID is found in the partner portal.
code_challenge
Unique value generated from the code verifier. See the example above.
code_challenge_method
S256
target
or target_id
The unique partnerorg identifier passed as the target
or target_id
parameter to your app's installation URL.
redirect_uri
(optional; required if multiple URLs are defined for the app) Callback URL where Gobo will redirect after authorization has been granted. The Authorization Code will be available in the code
parameter.
scope
(optional) A space-delineated list of scopes you are requesting. Gobo will only grant scopes that the app has already approved during installation. Leaving this blank will request all scopes to which the app has been approved.
state
(recommended) An arbitrary string your app adds to the request that Gobo will include when redirecting back to your redirect_uri. Guards against CSRF attacks. Also can be used to preserve state across requests.
A successful authorization code request will redirect to your provided redirect URI.
Now you can use the supplied code
to obtain an access token.
grant_type
authorization_code
client_id
Your app's client ID is found in the partner portal.
code
code
parameter provided by Gobo after redirecting to your redirect URI following a successful authorization code request.
code_verifier
Unique value used to create the code challenge provided during the authorization code request. See the example above.
redirect_uri
(optional; required if provided during authorization request) Callback URL where Gobo redirected during authorization.
When your access token expires, you can use the provided refresh token to obtain a new access token without having to go through the authorization code flow again. You will additionally be issued a new refresh token and the previous access token and refresh token will be invalidated.
grant_type
refresh_token
client_id
Your app's client ID is found in the partner portal.
refresh_token
Refresh token provided by Gobo alongside an access token obtained during an authorization code flow.