POST
/
auth
/
login
curl --request POST \
  --url https://api.otim.com/auth/login \
  --header 'Content-Type: application/json' \
  --data '{
  "siwe": "By signing in, you agree to the Terms and Conditions (https://otim.com/tac) and Privacy Policy (https://otim.com/pp).\nURI: https://otim.com Version: 1.0.0 Chain ID: 1 Nonce: 1728633600000 Issued At: 2025-02-07T16:00:00.000Z",
  "signature": {
    "yParity": 0,
    "r": "0x...",
    "s": "0x..."
  }
}'
{
  "authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
The “Try it” feature for this endpoint doesn’t work because it doesn’t double escapes newlines randomly for the siwe input. We recommend you try this in your terminal or a script.

Almost every API endpoint is authenticated using Bearer JWT tokens. In order to get the token, users sign an Otim-specific SIWE and submit the signature and siwe message to this endpoint.

Here’s a script to fetch both the siwe and signature inputs:

Body

application/json

Response

200 - application/json

Successful authentication

The response is of type object.