Sign in

Auth

POST https://{organization}.myguper.com/api/connect/auth

Authenticates a user by login + password and returns the matching person identity (personId, type).

Optionally accepts a Proof of Work challenge and nonce obtained from the Generate challenge endpoint. When provided, the server validates that SHA-256(challenge + nonce) <= target before checking credentials. This prevents brute-force attacks by requiring computational work before each login attempt.

Important: The challenge and nonce fields are currently optional for backward compatibility. They will become required in a future release. All clients should integrate the Proof of Work flow as soon as possible.

Wrong credentials always answer the same 401 — the response never says whether the login exists. After 8 failed attempts for the same login the endpoint answers 429 and stops checking the password for 15 minutes; a successful sign-in clears the counter.

Try-it values populated from environment ACME (Demo)


Authentication

Token

Most Connect endpoints require a valid x-guper-authorization token. Token issuance itself (/api/connect/auth) is the exception — it uses the x-guper-apikey and x-guper-apisecret credentials.

Headers

Name Type Description
x-guper-authorization * string User token issued by Guper.
Content-Type * string Always `application/json` for endpoints that accept a JSON body.

Request body

Content-Type: json

{
    "login": "tintin",
    "password": "a10b20c30",
    "challenge": "a1b2c3d4...64 hex chars",
    "nonce": "48293"
}

Responses

{
    "personId": 44,
    "type": "user",
    "dateTime": "2023-08-24T17:13:52-03:00"
}
Copied to clipboard