---
title: Authenticate with a personal token
description: Send an authenticated request and verify which account the API sees.
---

Create a personal token under the account menu's **API tokens**. Save it in your script's secret store and pass it as a bearer token. Use an account with the access needed for the resources the script will use.

```sh
export GLODRIK_URL=https://glodrik.example.com:8443
# Supply GLODRIK_TOKEN through your secret store or environment.
curl --fail-with-body --silent --show-error \
  -H "Authorization: Bearer ${GLODRIK_TOKEN}" \
  "${GLODRIK_URL}/api/me"
```

- **401** generally means the credentials are missing or invalid.
- **403** means the account lacks the required permission or the action is disallowed.
- **404** can mean the resource does not exist or is outside your access.
- **422** means the request did not match the endpoint's schema. Read the response body and check the schema on your instance.

Use TLS. If a private CA issues the instance's certificate, give curl that CA with `--cacert`. Revoke retired tokens from **API tokens**. The [reporting callback](/collection/setup) uses a separate reporting token issued for a team.
