Getting a token
You need a RideBox account. Create one on the website.
Request a token
Section titled “Request a token”curl -X POST "https://app.ridebox.my/api/auth/login" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \| Field | Required | Notes |
|---|---|---|
email |
Yes | Your account email |
password |
Yes | Your account password |
device_name |
Yes | A label for this token, up to 255 characters. It names your client, not your motorcycle |
Response
Section titled “Response”{ "data": { "token": "YOUR_TOKEN", "token_type": "Bearer", "expires_at": "2026-12-08T09:00:00Z", "user": { "id": "YOUR_USER_UUID", "name": "Your Name", "timezone": "Asia/Kuala_Lumpur" } }}Tokens last 30 days. Store the token securely and keep the expires_at value so you can refresh it in time.
A wrong email or password returns 422 with a message under email.
Next, read Authentication.