Soxway Docs
Authentication

Issue access token

Exchange email and password for a personal access token. Rate limited to 5 requests per minute per IP.

POST
/v1/auth/token

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.soxway.io/v1/auth/token" \  -H "Content-Type: application/json" \  -d '{    "email": "[email protected]",    "password": "your-password",    "token_name": "my-app"  }'
{
  "data": {
    "token": "1|abc123def456...",
    "token_type": "Bearer",
    "user": {
      "id": 1,
      "name": "John Doe",
      "email": "[email protected]",
      "balance": 25.5,
      "currency": "USD",
      "reseller_enabled": true,
      "created_at": "2019-08-24T14:15:22Z"
    }
  }
}
{
  "error": {
    "code": 1001,
    "message": "Authentication token is missing.",
    "description": "Include a Bearer token in the Authorization header.",
    "field": "string",
    "errors": [
      {}
    ]
  }
}
Empty