Authentication

Authenticate user

post

Authenticate a user using EIP712 signature or API key and return access/refresh tokens

Body
methodstring Β· enumRequired

Authentication method

Example: eip712Possible values:
addressstringRequired

User wallet address

Example: 0x1234567890123456789012345678901234567890Pattern: ^0x[a-fA-F0-9]{40}$
clientIdstringRequired

Client identifier

Example: phantom-exchange
detailsone ofRequired

Authentication method specific details

or
Responses
chevron-right
200

Authentication successful

application/json
post
/auth/login

Get EIP712 message to sign

get

Generate EIP712 structured data for client-side signing

Query parameters
addressstringRequired

User wallet address

Example: 0x1234567890123456789012345678901234567890
clientIdstringRequired

Client identifier

Example: phantom-exchange
Responses
chevron-right
200

EIP712 message generated successfully

application/json
get
/auth/eip712-message

Refresh access token

post

Use a valid refresh token to obtain a new access token and refresh token

Body
refreshTokenstringRequired

Refresh token

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Responses
chevron-right
200

Token refresh successful

application/json
post
/auth/refresh

Logout user

post

Invalidate refresh token and log out the user

Body
refreshTokenstringRequired

Refresh token to invalidate

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Responses
chevron-right
200

Logout successful

application/json
post
/auth/logout

Last updated