Issue Token

  • POST
  • /oauth2
  • /token

Issue OAuth 2.0 token

Request

BODY PARAMETERS
grant_typerequiredstring
Grant type: authorization_code, client_credentials, or refresh_token
client_idstring
OAuth 2.0 client identifier
client_secretstring
OAuth 2.0 client secret
codestring
Authorization code (required for authorization_code grant)
redirect_uristring
Redirect URI
code_verifierstring
PKCE code verifier
refresh_tokenstring
Refresh token (required for refresh_token grant)
scopestring
Requested OAuth 2.0 scopes (required for client_credentials grant)

Response

RESPONSE BODY
access_tokenstring
The access token issued by the authorization server
token_typestring
The type of the token issued
expires_ininteger
The lifetime in seconds of the access token
refresh_tokenstring
The refresh token, which can be used to obtain new access tokens
refresh_token_expires_ininteger
The lifetime in seconds of the refresh token

Last modified on May 19, 2026

Request example

CURL
curl -X POST "https://api.buddy.works/oauth2/token" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json"
EXAMPLE RESPONSE
{ "access_token": "e4d6521d0cbad72e1e7f2d0ba3ef74b6b2e7a5c8", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c", "refresh_token_expires_in": 15811201 }
STATUS
200 OK