Skip to the content.

Issue API token (GetUserID)

Authenticate a user/password and (optionally) issue a fresh tsid token.

Endpoint: POST https://<base>/api/v2/GetUserID.php

Authenticates a user (HTTP Basic, tsid, or sid) and returns the customer / user ids and the per-feature permission flags. When called with tsid=1, it also issues a brand-new tsid (20 characters) that you can store and reuse on subsequent calls.

This is typically the first endpoint integration code calls — it converts username/password into a stable token your servers can keep.

Authentication

Three modes are accepted:

See Authentication.

Request

tsid — type: integer | string

Pass the literal 1 to issue a brand-new token in addition to authenticating. Pass an existing tsid to introspect it.

Request example

```bash curl (HTTP Basic, request new token) curl -X POST ‘https:///api/v2/GetUserID.php’
-u “your_user:your_password”
-d ‘tsid=1’


```bash curl (introspect existing token)
curl -X POST 'https://<base>/api/v2/GetUserID.php' \
  -d 'tsid=YOUR_EXISTING_TSID'

Response

```json 200 OK { “return”: { “status”: “OK”, “status_code”: “0”, “cdcs_id”: “1234”, “cdcsu_id”: “987”, “aut_app”: “1”, “aut_send”: “1”, “aut_camp”: “1”, “tsid”: “Ab1Cd2Ef3Gh4Ij5Kl6Mn” } }


```json 401 Unauthorized
{
  "return": {
    "status": "fail authentication",
    "status_code": "100",
    "cdcs_id": "0",
    "cdcsu_id": "0",
    "aut_app": "0",
    "aut_send": "0",
    "aut_camp": "0",
    "tsid": "null"
  }
}

Error codes

This endpoint is gated by log_api_v2 — most failures come from there:

Code status Cause
100 fail authentication Credentials wrong, account inactive, or required input missing.
131 IP trials exceeded Too many attempts from this IP in 10 minutes.
132 user trials exceeded Too many failed attempts for this user in 10 minutes.
140 invalid user/pass Wrong username or password.
199 IP blocked IP is on the permanent blacklist.

Usage tips