Consume an integration OAuth transaction
Consumes the OAuth transaction whose ID was received as the state of an OAuth callback. A transaction can be consumed once, by the integration that it was created for, and only with the authorization code that the user who started the connection confirmed in GitBook. Returns the installation the credentials must be written to, the PKCE code verifier, and a single-use grant to pass as oauthTransaction when writing the credentials.
Name of the integration.
^[a-zA-Z0-9-_.]+$ID of the OAuth transaction, as received in the state parameter
The exact redirect_uri sent to the provider's authorize and token endpoints.
The authorization code received on the callback.
The transaction has been consumed.
ID of the organization of the installation.
ID of the installation the credentials must be written to.
ID of the space whose installation the credentials must be written to.
ID of the site whose installation the credentials must be written to.
PKCE code verifier, to send as code_verifier when exchanging the code.
The validated redirect URI.
Forbidden
Not Found
POST /v1/integrations/{integrationName}/oauth-transactions/{transactionId}/consume HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36
{
"redirectUri": "text",
"code": "text"
}{
"object": "integration-oauth-transaction",
"id": "text",
"organization": "text",
"installation": "text",
"space": "text",
"site": "text",
"codeVerifier": "text",
"redirectUri": "text",
"grantExpiresAt": "2026-01-01T00:00:00.000Z"
}Last updated
Was this helpful?