---
title: Access Token
slug: fiat-docs/access-token
docTags: 
createdAt: 2024-02-07T09:42:46.454Z
---

# Get Access Token

This api returns access token that can be used in some of our API endpoints.

**Important**: **Only call this API from server side** where the api-secret is well protected. &#x20;

:::ApiMethodV2
```json
{
  "name": "Get Access Token",
  "method": "GET",
  "url": "https://your-hostname.pay3.app/v1/auth/access-token",
  "description": "Get access token using api secret and client id",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "AZqOTJjcGUy11gU45LLMe",
        "language": "curl",
        "code": "curl --location 'https://your-hostname.pay3.app/v1/auth/access-token' \\\n--header 'api-secret: YOUR-API-SECRET' \\\n--header 'client-id: YOUR-CLIENT-ID'\n ",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "AZqOTJjcGUy11gU45LLMe"
  },
  "results": {
    "languages": [
      {
        "id": "kCj1U3BaA8qdjse8CmUlZ",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"accessToken\": \"ACCESS-TOKEN-IN-JWT\"\n}"
      },
      {
        "id": "MI7qeU6S41sbo6vz9368z",
        "language": "401",
        "customLabel": "",
        "code": "Unauthorized access"
      }
    ],
    "selectedLanguageId": "kCj1U3BaA8qdjse8CmUlZ"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "api-secret",
        "kind": "required",
        "type": "string",
        "description": "Access token received from Access token API. You can reuse the access token across multiple API calls till it is expired.",
        "children": []
      },
      {
        "name": "client-id",
        "kind": "required",
        "type": "string",
        "description": "Client Id",
        "children": []
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  }
}
```
:::

