Skip to content

Getting a token

You need a RideBox account. Create one on the website.

Terminal window
curl -X POST "https://app.ridebox.my/api/auth/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"email":"[email protected]","password":"YOUR_PASSWORD","device_name":"my-integration"}'
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
{
"data": {
"token": "YOUR_TOKEN",
"token_type": "Bearer",
"expires_at": "2026-12-08T09:00:00Z",
"user": {
"id": "YOUR_USER_UUID",
"name": "Your Name",
"email": "[email protected]",
"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.