OAuth2 Access Token is a credential that represents the authorization granted to the client. It's used to access protected resources on the resource server on behalf of the resource owner (user).
// Bearer token in Authorization header
GET /api/user/profile
Authorization: Bearer eyJhbGciOiJSUzI1NiIs...
// Response
{
"id": "123",
"name": "John Doe",
"email": "john@example.com"
}
POST /token
// Response
{
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "dGhpcyBpcyBhIHJlZnJl...",
"scope": "read:profile write:profile"
}