TrustColdDevelopers
Trips›Login

Login

Optional password exchange if you are not using a static client key.

Run this from your browser — add your free test keys.
curl -X POST https://trustcoldeg.com/api/v1/b2b/login \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"login":"client-username","password":"secret","device_name":"partner-system"}'
{
  "data": {
    "token": "1|k3Yx…store-this-value",
    "token_type": "Bearer",
    "client": { "id": 32, "code": "CL-0032", "name": "Example Trading Co." },
    "user": { "id": 7, "name": "Sara" }
  }
}

Validation failed

{
  "message": "The account or password is not correct.",
  "errors": {
    "login": ["The account or password is not correct."]
  }
}

Key points

  • Body — login (username or email), password, optional device_name.
  • Result — Store the token and send it as Bearer on later calls.
  • Errors — 422 bad credentials. 403 if the account is inactive or not linked to a client.

Exchange the client account for a token. Store the token and send it on later calls.

FieldRequiredDescription
loginYesUsername or email
passwordYesPassword
device_nameNoLabel for this integration

200 on success. 422 with errors.login for bad credentials. 403 if the account is inactive or not linked to a client.