### Request API Token via cURL Source: https://developer.swoogo.com Use this cURL command to exchange encoded credentials for a bearer token. Ensure the Authorization header is set with your base64 encoded consumer key and secret. ```Shell curl --request POST \ --url https://api.swoogo.com/api/v1/oauth2/token \ --header 'accept: application/json' \ --header 'content-type: application/x-www-form-urlencoded' ``` -------------------------------- ### API Token Response Format Source: https://developer.swoogo.com The expected JSON response body after a successful POST request to the token endpoint. ```JSON { "access_token": "{{access-token}}", "expires_at": "2024-11-08 16:04:40", "type": "bearer" } ``` -------------------------------- ### Request API Token Source: https://developer.swoogo.com This endpoint is used to obtain a bearer token for authenticating API requests. It requires your consumer key and secret to be Base64 encoded and sent in the Authorization header. ```APIDOC ## POST /api/v1/oauth2/token ### Description Requests an API bearer token using client credentials. ### Method POST ### Endpoint https://api.swoogo.com/api/v1/oauth2/token ### Parameters #### Request Body - **grant_type** (string) - Required - Must be set to 'client_credentials'. ### Request Example ```json { "grant_type": "client_credentials" } ``` ### Response #### Success Response (200) - **access_token** (string) - The obtained bearer token. - **expires_at** (string) - The expiration timestamp of the token. - **type** (string) - The type of token, typically 'bearer'. #### Response Example ```json { "access_token": "{{access-token}}", "expires_at": "2024-11-08 16:04:40", "type": "bearer" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.