### Example Response for Access Token Request (JSON) Source: https://docs.api.jibble.io/index This is an example of a successful response when requesting an access token using client credentials. The response is in JSON format and includes the access token, its expiration time, token type, scope, organization ID, and person ID. ```json { "access_token": "eyJhbGciO...Gcbsqj7wQ", "expires_in": 2147483647, "token_type": "Bearer", "scope": "api1", "organizationId": "2a4c64a5-88ba-4bb1-91b6-527b7546c743", "personId": "a22c6219-fa45-4e9f-993f-af1853cc98c4" } ``` -------------------------------- ### Get Access Token using Client ID and Secret (cURL) Source: https://docs.api.jibble.io/index This snippet demonstrates how to obtain a Bearer access token from the Jibble API using OAuth 2.0 client credentials. It requires a client ID and client secret, which can be generated in the organization settings. The request is made to the token endpoint with specific headers and form-urlencoded data. ```cURL curl --location 'https://identity.prod.jibble.io/connect/token' \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'client_id=•••••••' \ --data-urlencode 'client_secret=•••••••' ``` -------------------------------- ### POST /connect/token Source: https://docs.api.jibble.io/index Obtain a Bearer access token using client credentials for machine-to-machine authentication. ```APIDOC ## POST /connect/token ### Description Obtain a Bearer access token using client credentials. This endpoint is used for machine-to-machine interactions. ### Method POST ### Endpoint https://identity.prod.jibble.io/connect/token ### Parameters #### Headers - **Accept** (string) - Required - `application/json` - **Content-Type** (string) - Required - `application/x-www-form-urlencoded` #### Request Body - **grant_type** (string) - Required - `client_credentials` - **client_id** (string) - Required - Your application's client ID. - **client_secret** (string) - Required - Your application's client secret. ### Request Example ```curl curl --location 'https://identity.prod.jibble.io/connect/token' \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'client_id=YOUR_CLIENT_ID' \ --data-urlencode 'client_secret=YOUR_CLIENT_SECRET' ``` ### Response #### Success Response (200 OK) - **access_token** (string) - The obtained Bearer token. - **expires_in** (integer) - The token's expiration time in seconds. - **token_type** (string) - The type of token, usually "Bearer". - **scope** (string) - The scope granted to the token. - **organizationId** (string) - The ID of the organization associated with the token. - **personId** (string) - The ID of the person associated with the token. #### Response Example ```json { "access_token": "eyJhbGciO...Gcbsqj7wQ", "expires_in": 2147483647, "token_type": "Bearer", "scope": "api1", "organizationId": "2a4c64a5-88ba-4bb1-91b6-527b7546c743", "personId": "a22c6219-fa45-4e9f-993f-af1853cc98c4" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.