POST
/
auth
/
verify
Verify OTP
curl --request POST \
  --url https://grid.squads.xyz/api/grid/v1/auth/verify \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-grid-environment: <api-key>' \
  --data '{
  "email": "user@example.com",
  "otp_code": "123456",
  "provider": "privy",
  "encryption_public_key": "base64encodedkey..."
}'
{
  "data": {
    "address": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
    "policies": {
      "signers": [
        {
          "address": "11111111111111111111111111111112",
          "role": "primary",
          "permissions": [
            "CAN_INITIATE",
            "CAN_VOTE"
          ],
          "provider": "privy"
        }
      ],
      "threshold": 1
    },
    "grid_user_id": "123e4567-e89b-12d3-a456-426614174003",
    "authentication": [
      {
        "provider": "privy",
        "session": {
          "user_id": "user123",
          "session": {}
        }
      }
    ]
  },
  "metadata": {
    "request_id": "123e4567-e89b-12d3-a456-426614174001",
    "timestamp": "2023-07-15T14:31:00.000Z"
  }
}
This endpoint is for verifying the OTP code sent to the email address when authenticating an existing user. For new users, use the Create Account endpoint.

Authorizations

Authorization
string
header
required

API key authentication with Bearer token. Include the API key in the Authorization header as 'Bearer YOUR_API_KEY'

x-grid-environment
string
header
required

Environment identifier for the Grid API. Use 'sandbox' for testing on devnet or 'production' for production on mainnet.

Body

application/json

Response

200
application/json

OTP verified successfully

The response is of type object.