Sign in with username and password
Returns a bearer token pair. Failed attempts count toward the same lockout and per-network/device
throttling as the dashboard sign-in (HTTP 401 auth.invalid_credentials, then 429
auth.login_temporarily_blocked). The company must have the public API enabled, otherwise
403 channel_disabled and no token is issued. Rate limit policy: 30 requests per minute per IP.
Request body · PublicLoginRequestapplication/json
The credentials.
| Field | Type | Description |
|---|---|---|
username | stringnullable | Username or e-mail address. |
password | stringnullable | Password. |
The OpenAPI document does not mark required fields formally, so “required” is read from each field’s description. The guides list the required fields of every request.
Request example
curl -X POST "https://api.goldrock.live/api/public/v1/auth/login" \
-H "Content-Type: application/json" \
-d '{
"username": "ahmed@your-company.example",
"password": "YOUR_PASSWORD"
}'const response = await fetch("https://api.goldrock.live/api/public/v1/auth/login", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"username": "ahmed@your-company.example",
"password": "YOUR_PASSWORD"
}),
});
const data = await response.json();
console.log(response.status, data);<?php
$url = 'https://api.goldrock.live/api/public/v1/auth/login';
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'username' => 'ahmed@your-company.example',
'password' => 'YOUR_PASSWORD',
], JSON_UNESCAPED_UNICODE),
]);
$result = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
var_dump($status, json_decode($result, true));import requests
response = requests.request(
"POST",
"https://api.goldrock.live/api/public/v1/auth/login",
json={
"username": "ahmed@your-company.example",
"password": "YOUR_PASSWORD",
},
timeout=30,
)
print(response.status_code, response.json())Samples use an API key; replace the placeholders. To use a bearer token instead, send Authorization: Bearer <accessToken>.
Responses
200Signed in.
Responses · Field
| Field | Type | Description |
|---|---|---|
accessToken | stringnullable | JWT to send as |
refreshToken | stringnullable | Single-use refresh token. |
tokenType | stringnullable | Always |
expiresIn | integer (int32) | Lifetime of the access token in seconds. |
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "q3kZ0m8w...",
"tokenType": "Bearer",
"expiresIn": 900
}| Status | Description |
|---|---|
400 | The request is invalid (code |
401 | Wrong username or password. |
403 | Public API disabled for the company, company suspended, or account inactive. |
422 | A business rule or a location could not be satisfied (codes such as |
429 | Too many attempts. |
Error responses share one body, described in the error reference. Error reference