> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noyo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authenticate to Noyo

> Authenticate to our API so you can start using our endpoints

<RequestExample lines>
  ```python theme={"system"}
  import base64
  import json
  import requests

  client_id = "<CLIENT_ID>"
  secret = "<CLIENT_SECRET>"

  client_secret_base64 = base64.b64encode(
      f"{client_id}:{secret}".encode("utf-8")
  ).decode("utf-8")

  headers = {
      "Content-Type": "application/json",
      "Authorization": f"Basic {client_secret_base64}"
  }

  get_api_token_prod_url = "https://accounts.noyo.com/auth/public/token"
  payload = json.dumps({
      "grant_type": "client_credentials"
  })

  get_api_token_response = requests.post(
      get_api_token_prod_url, headers=headers, data=payload
  )
  access_token = get_api_token_response.json()["access_token"]

  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={"system"}
  {
      "access_token": "<ACCESS_TOKEN>",
      "expires_in": 864000,
      "token_type": "Bearer"
  }
  ```
</ResponseExample>

<Steps>
  <Step title="Step 1">
    See our <a href="/docs/introduction/getting-started/authentication">authentication guide</a> for more details on this flow.

    Use the `CLIENT_ID` and `CLIENT_SECRET` as the username/password combination for the Basic Authentication header.
  </Step>

  <Step title="Set URL and request payload">
    Use appropriate GET /token URL and payload
  </Step>

  <Step title="Generate access token">
    Make API request to generate short-lived access token
  </Step>
</Steps>
