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

# Authentication

> Exchange your client credentials for a bearer access token.

The Scout API uses the OAuth 2.0 **client credentials** grant. You exchange a `client_id` /
`client_secret` pair for a short-lived bearer token, then send that token on every request.

<Steps>
  <Step title="Get your credentials">
    Scout issues a `client_id` and `client_secret` per district. Contact your Scout representative to
    request them. Treat the secret like a password.
  </Step>

  <Step title="Request an access token">
    `POST` to the token endpoint with `grant_type=client_credentials`. You can pass the credentials
    either via HTTP Basic auth or in the form body.

    ```bash theme={null}
    curl -X POST https://api.teachwithscout.com/v1/ims/oneroster/v1p1/token \
      -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "grant_type=client_credentials"
    ```

    The response contains your token:

    ```json theme={null}
    {
      "access_token": "eyJhbGciOi...",
      "token_type": "bearer",
      "expires_in": 3600
    }
    ```
  </Step>

  <Step title="Call the API">
    Send the token in the `Authorization` header as a bearer token.

    ```bash theme={null}
    curl https://api.teachwithscout.com/v1/ims/oneroster/v1p1/students \
      -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
    ```
  </Step>
</Steps>

<Note>
  Access tokens expire after **1 hour** (`expires_in: 3600`). Request a new token when the current one
  expires. OneRoster 1.2 clients should use the `/ims/oneroster/v1p2/token` endpoint instead.
</Note>
