Get session

Authentication · Reads onchain state

Resolves the address that the presented access token authenticates. It is the whoami of the API: given nothing but the bearer token, it answers which wallet this session belongs to, which is exactly what a server-side consumer needs to trust a request without re-verifying a signature. Reach for it to restore a session on load, to guard a route, or to confirm a token still lives before doing something that needs it.

Send a request

Response

{
data: {
address: string
}
}

Code samples

Language

Claude

Prompt

Call the Plug API endpoint "Get session".
## Endpoint
GET /auth/session
Base URL: https://api.plug.to
## Description
Resolves the address that the presented access token authenticates.
It is the whoami of the API: given nothing but the bearer token, it answers which wallet this session belongs to, which is exactly what a server-side consumer needs to trust a request without re-verifying a signature.
Reach for it to restore a session on load, to guard a route, or to confirm a token still lives before doing something that needs it.
## Response Schema
- data (object, required)
- address (string, required) — The EVM address the presented access token authenticates.
## Example Request
GET https://api.plug.to/auth/session