---
title: Authenticate
slug: api/preview/authenticate
docTags: 
createdAt: 2026-03-01T03:12:36.506Z
---

{
  "id": "DWxdHbeggqN0eByPv7rJM",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://openapi.sine.co/v1/api/oauth2/token",
    "servers": [
      {
        "url": "https://openapi.sine.co/v1/api/oauth2/token",
        "description": "Sine Public API"
      }
    ],
    "name": "Authenticate",
    "description": "Generate Access Token",
    "contentType": "application/x-www-form-urlencoded",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "x-sine-team-id",
          "type": "string<uuid>",
          "description": "The UUID of the Team",
          "format": "uuid"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [
        {
          "name": "grant_type",
          "kind": "required",
          "type": "string",
          "description": "OAuth2 grant type",
          "example": "client_credentials"
        },
        {
          "name": "client_id",
          "kind": "required",
          "type": "string",
          "description": "client id",
          "example": "ffTUyNO8fkHR0a5on8QRBL3GVl33cs9U"
        },
        {
          "name": "client_secret",
          "kind": "required",
          "type": "string",
          "description": "client secret",
          "example": "zbhLZofqv7OxhTrimY8ph8RDFDJyHxat"
        }
      ],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "token_type",
                "kind": "optional",
                "type": "string",
                "description": "token type",
                "example": "Bearer"
              },
              {
                "name": "access_token",
                "kind": "optional",
                "type": "string",
                "description": "access token",
                "example": "SHJcJf76hWBjoW3FMywUZ2xKMQ7rYQ6e"
              },
              {
                "name": "expires_in",
                "kind": "optional",
                "type": "number",
                "description": "<p>token time-to-live in seconds</p>",
                "example": 120
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": "HTTP status code",
                "example": "BAD_REQUEST"
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "Custom Error Message",
                "example": "Invalid client authentication"
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal server error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"code\":\"INTERNAL_SERVER_ERROR\",\"message\":\"Something went wrong, please try again later\"}",
            "description": "",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": "HTTP status code",
                "example": "INTERNAL_SERVER_ERROR"
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "Custom error message",
                "example": "Something went wrong, please try again later"
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "W5PYHgZkfppvpQ7UT-N-9",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://openapi.sine.co/v1/api/oauth2/token \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/x-www-form-urlencoded' \\\n     --header 'x-sine-team-id: string<uuid>' \\\n     --data 'grant_type=client_credentials' \\\n     --data 'client_id=ffTUyNO8fkHR0a5on8QRBL3GVl33cs9U' \\\n     --data 'client_secret=zbhLZofqv7OxhTrimY8ph8RDFDJyHxat'"
        },
        {
          "id": "rupaSvTGtIhjIWHMHDSOS",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/x-www-form-urlencoded\");\nmyHeaders.append(\"x-sine-team-id\", \"string<uuid>\");\n\nvar urlencoded = new URLSearchParams();\nurlencoded.append(\"grant_type\", \"client_credentials\");\nurlencoded.append(\"client_id\", \"ffTUyNO8fkHR0a5on8QRBL3GVl33cs9U\");\nurlencoded.append(\"client_secret\", \"zbhLZofqv7OxhTrimY8ph8RDFDJyHxat\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: urlencoded,\n   redirect: 'follow'\n};\n\nfetch(\"https://openapi.sine.co/v1/api/oauth2/token\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "VqtUVsyQz6au28l6EZmEv",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://openapi.sine.co/v1/api/oauth2/token\"\n\npayload = 'grant_type=client_credentials&client_id=ffTUyNO8fkHR0a5on8QRBL3GVl33cs9U&client_secret=zbhLZofqv7OxhTrimY8ph8RDFDJyHxat'\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/x-www-form-urlencoded',\n   'x-sine-team-id': 'string<uuid>'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "W5PYHgZkfppvpQ7UT-N-9"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"token_type\": \"Bearer\",\n  \"access_token\": \"SHJcJf76hWBjoW3FMywUZ2xKMQ7rYQ6e\",\n  \"expires_in\": 120\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad request\n{\n  \"code\": \"BAD_REQUEST\",\n  \"message\": \"Invalid client authentication\"\n}"
        },
        {
          "id": "response-2-500",
          "language": "500",
          "code": "// Internal server error\n{\n  \"code\": \"INTERNAL_SERVER_ERROR\",\n  \"message\": \"Something went wrong, please try again later\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}