### cURL Example for Access Token Source: https://developer.wildjar.com/ Example using cURL to request an access token. Ensure your username and password are correctly formatted and encoded. ```bash curl -X POST -d 'grant_type=client_credentials' -u 'username:password' https://api.trkcall.com/v2/token/ ``` -------------------------------- ### Requesting an access token Source: https://developer.wildjar.com/ Obtain an access token by sending a POST request to the token endpoint. The request body should include 'grant_type=client_credentials', and the Authorization header should contain a Basic authentication string with your username and password. ```APIDOC ## POST /v2/token ### Description Requests an access token for API authentication. ### Method POST ### Endpoint https://api.trkcall.com/v2/token/ ### Parameters #### Request Body - **grant_type** (string) - Required - Must be 'client_credentials'. #### Headers - **Authorization** (string) - Required - Basic authentication header containing a Base64 encoded string of 'username:password'. ### Request Example ```bash curl -X POST -d 'grant_type=client_credentials' -u 'username:password' https://api.trkcall.com/v2/token/ ``` ### Response #### Success Response (200) - **access_token** (string) - The obtained access token. - **token_type** (string) - The type of token, usually 'bearer'. - **expires_in** (integer) - The time in seconds until the token expires. #### Response Example ```json { "access_token": "_NRyFKc...MzUpw", "token_type": "bearer", "expires_in": 3600 } ``` ``` -------------------------------- ### Pagination Parameters Source: https://developer.wildjar.com/ Use 'perPage' to set the number of records per page (up to 2000) and 'page' to navigate through the results. ```plaintext ?perPage=10&page=1 ``` -------------------------------- ### Request Access Token Source: https://developer.wildjar.com/ Use a POST request to the token endpoint to obtain an access token. The body must include 'grant_type=client_credentials'. ```http POST https://api.trkcall.com/v2/token/ ``` ```plaintext grant_type=client_credentials ``` ```plaintext Authorization: Basic {{base64 encoded username:password}} ``` -------------------------------- ### Authenticating a request Source: https://developer.wildjar.com/ Authenticate subsequent API requests by including the obtained access token in the Authorization header as a Bearer token. ```APIDOC ### Authenticating a request To authenticate your requests, specify the access token requested in the previous step in the request header. #### Headers - **Authorization** (string) - Required - Bearer token obtained from the token endpoint. Example: ``` Authorization: Bearer {{access_token}} ``` ``` -------------------------------- ### Account Filtering Parameters Source: https://developer.wildjar.com/ Filter requests by one or more account numbers using the 'account' query parameter, separating multiple numbers with commas. ```plaintext ?account=20000,20001 ``` -------------------------------- ### Access Token Response Source: https://developer.wildjar.com/ The response to a successful access token request includes the token, type, and expiry time. ```json {"access_token":"_NRyFKc...MzUpw","token_type":"bearer","expires_in":3600} ``` -------------------------------- ### Authenticate API Request Source: https://developer.wildjar.com/ Include the obtained access token in the 'Authorization' header as a Bearer token for subsequent API requests. ```plaintext Authorization: Bearer {{access_token}} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.