Cliquify Developer
  1. Authentication
  • Overview
    • Getting started
  • other
    • Integrations
    • Appendix
      • OAuth Scopes
      • Error Responses
    • Templates
      • Get Tags
      • Get Templates
    • User
      • Get Authenticated User
    • Authentication
      • Overview
      • Generate Access Token
        POST
      • Introspect Access Token
        POST
      • Revoke Token
        POST
    • Get Brand Assets
      GET
  • Authentication
    • Overview
    • Token lifecycle
    • OAuth scopes
    • Get an access token
      POST
    • Introspect a token
      POST
    • Revoke a token
      POST
  1. Authentication

Generate Access Token

Developing
POST
{{baseUrl}}oauth/access-token
Exchange an authorization code for an access token after a user has authenticated and authorized your application.
This is part of the OAuth 2.0 Authorization Code Grant flow and requires a valid code and state from the /oauth/authorize redirect.

Before you begin#

1.
Log in to the Developer Portal: {{baseUrl}}oauth/clients
2.
Create an OAuth client if not already created.
3.
Redirect users to /oauth/authorize with required query parameters.
4.
After approval, you'll receive code and state on your redirect_uri.
5.
Send these to /oauth/access-token to obtain tokens.

Access token expiry#

Access tokens are valid for 1 year (365 days).
Token type: Bearer
Expires in: 31536000 seconds
Note: Tokens do not auto-renew. You must refresh or re-authorize after expiry.

Request

Header Params

Body Params application/x-www-form-urlencodedRequired

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '{{baseUrl}}oauth/access-token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=authorization_code' \
--data-urlencode 'code=AUTH_CODE' \
--data-urlencode 'client_id=YOUR_CLIENT_ID' \
--data-urlencode 'client_secret=YOUR_CLIENT_SECRET' \
--data-urlencode 'redirect_uri={{baseUrl}}auth/callback' \
--data-urlencode 'state=UNIQUE_STATE'
Response Response Example
{
  "token_type": "Bearer",
  "expires_in": 31536000,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
  "refresh_token": "def5020052753bd062e173..."
}
Modified at 2026-04-08 11:49:55
Previous
Overview
Next
Introspect Access Token
Built with