ezForex
Toggle sidebar
Log in
Authentication

Obtain a personal access token with email and password, then send it as a Bearer token on protected endpoints.

POST
/api/login

No authentication required. Throttled to protect against brute-force attempts.

Request body
{
  "email": "api@example.com",
  "password": "your-password"
}
Successful response

HTTP 200

{
  "token": "1|aBcDeFgHiJkLmNoPqRsTuVwXyZ...",
  "token_type": "Bearer"
}
Using the token

Include the token on every authenticated request:

Authorization: Bearer 1|aBcDeFgHiJkLmNoPqRsTuVwXyZ...
Example
curl -X POST https://ezforex.your-developer.co.za/api/login \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"email":"api@example.com","password":"your-password"}'
Errors
  • 401 — Invalid email or password.
  • 422 — Validation failed (missing or invalid fields).
  • 429 — Too many login attempts; retry later.