AuthService
Get Auth Context
Retrieve the caller auth context, including account identity, API key identity, and session assurance details.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/auth/me' \ --header 'Accept: */*' \ --header 'X-API-KEY-ID: YOUR_API_KEY_ID' \ --header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \ --header 'X-API-SIGNATURE: YOUR_API_SIGNATURE'
Responses
{
"accountId": "3GHeLpKiHfn",
"apiKeyId": "ak_1a3c6de8153d5a5b04cd2a6529779542",
"rootSmartAccountAddress": "0x2222222222222222222222222222222222222222",
"session": {
"authTime": "2025-01-01T00:00:00Z",
"authenticationMethods": [
"totp"
],
"sessionId": "session_01J0EXAMPLE",
"sessionLevel": "PRIMARY_AUTHENTICATED"
},
"username": "trader_alpha"
}Root account identifier (opaque ID).
3GHeLpKiHfnStable public identifier of the API key that authenticated this request, formatted as "ak_" followed by 32 lowercase hexadecimal characters. Absent when the request was not authenticated with an API key.
ak_1a3c6de8153d5a5b04cd2a6529779542Optional current username for the root account (empty if not set).
trader_alphaRoot smart-account EVM address, formatted as 0x plus 40 hex characters. Empty if not set.
0x2222222222222222222222222222222222222222Stable session identifier shared by the primary and MFA-elevated tokens.
session_01J0EXAMPLEAssurance level represented by this session response.
PRIMARY_AUTHENTICATEDAuthentication methods used for this session state, such as wallet, TOTP, passkey, or recovery code. Maximum 8 unique values.
["totp"]Time when the session was authenticated or elevated.
2025-01-01T00:00:00Z| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |