Soxway Docs
Authentication

Выпустить токен доступа

Обменять email и пароль на персональный токен доступа. Ограничение: 5 запросов в минуту на IP.

POST
/v1/auth/token

Тело запроса

application/json

TypeScript определения

Use the request body type in TypeScript.

Тело ответа

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": [
      {}
    ]
  }
}
Пусто