See Authentication for when to use tokens. If you use an organization account, see Authentication for organizations instead.
How to authenticate · OpenAPI spec for these endpoints
/api/v1/auth_tokens.json
Creates a new authentication token for API access using user credentials.
x-rwgps-api-key
string
required
user
object
required
email
string
required
password
string
required
auth_token
object
auth_token
string
api_key
string
created_at
date-time
updated_at
date-time
user
object
id
integer
first_name
string
last_name
string
display_name
string
email
string
created_at
date-time
updated_at
date-time
curl \
-H "x-rwgps-api-key: $API_KEY" \
-X POST \
-H "Content-Type: application/json" \
-d '{
"user": {
"email": "alex@example.com",
"password": "{password}"
}
}' \
https://ridewithgps.com/api/v1/auth_tokens.json
{
"auth_token": {
"auth_token": "c0cc78875f250604f9abac97712e314c",
"api_key": "2704a8df",
"created_at": "2000-01-01T12:00:00Z",
"updated_at": "2000-01-01T12:00:00Z",
"user": {
"id": 123,
"first_name": "Alex",
"last_name": "Rider",
"display_name": "Alex Rider",
"email": "alex@example.com",
"created_at": "2000-01-01T12:00:00Z",
"updated_at": "2000-01-01T12:00:00Z"
}
}
}