Browse the docs Open

Authentication

One bearer token, every request.

Authenticated endpoints use a Sanctum personal access token. Send it as a bearer token in the Authorization header. Tokens must carry the `api_requests` ability.

Authorization: Bearer <your-token> Accept: application/json

GET /v1/auth

Verify the current token

Returns the account the token belongs to. Use it to confirm a token is valid and to read the signed-in identity.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

Example request

curl

curl https://snapsbrew.com/api/v1/auth \
  -H 'Authorization: Bearer <your-token>' \
  -H 'Accept: application/json'

Example responses

200 Token is valid.
{
    "data": {
        "email": "[email protected]",
        "name": "Ada Lovelace"
    }
}
401 Missing or invalid token.
{
    "message": "Unauthenticated."
}
403 Token lacks the api_requests ability.
{
    "message": "Invalid ability provided."
}