OAuth2
Exchange an authorization code for an access token.
Token endpoint as defined by RFC 6749 §4.1.3.
Exchange an authorization code (obtained from the authorization endpoint) for a GitGuardian Personal Access Token (PAT). The request and response follow the OAuth 2.0 spec.
This endpoint does not require authentication: the client authenticates itself by submitting the client_id (and client_secret for confidential clients) in the request body.
post/v1/oauth/token
Response
Token successfully issued.
Example response
{
"access_token": "gg_pat_AbCdEf123456...",
"token_type": "Bearer",
"expires_in": 2592000,
"type": "personal_access_token",
"name": "My MCP client",
"account_id": 1234,
"expire_at": "2026-06-20T04:46:00+00:00",
"scope": [
"scan",
"incidents:read"
]
}