POST
/
auth
/
login
POST /auth/login
curl --request POST \
  --url https://api.example.com/auth/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "wallet_address": "<string>",
  "signature_base58": "<string>",
  "nonce": "<string>"
}
'
{
  "401": {},
  "token": "<string>",
  "wallet_address": "<string>",
  "user_id": "<string>",
  "expires_at": "<string>"
}

Overview

Verify the signed message from your wallet and receive a JWT token for authenticated API calls.

Request

curl -X POST https://api.agentik.dev/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "wallet_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
    "signature_base58": "5J7Zn...", 
    "nonce": "abc123def456"
  }'

Body Parameters

wallet_address
string
required
Solana wallet public key that signed the message
signature_base58
string
required
Base58-encoded signature from wallet
nonce
string
required
Nonce received from /auth/nonce

Response

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "wallet_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
  "user_id": "usr_abc123",
  "expires_at": "2026-02-13T10:30:00Z"
}
token
string
JWT token for authenticated requests (valid 24 hours)
wallet_address
string
Verified wallet address
user_id
string
Internal user ID
expires_at
string
Token expiration timestamp

Using the Token

Include the token in the Authorization header:
curl https://api.agentik.dev/api/subscription/status \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Errors

401
error
Invalid signature or expired nonce