Skip to main content
GET
Get Direct Login URL
Generates a unique, secure one-time login URL for a ChatSyncs end-user account — useful for single sign-on from your own platform into ChatSyncs. This is “get-or-create”: if the email already exists under your agent, it just returns a login link for that account; if it doesn’t exist yet, it creates it first (when you pass create_on_fail=1, package_id, and expired_date).
Where to find package_id (only needed when creating a new user): open Control Panel → User Permission — it’s the Package ID column. See Finding Your IDs & API Token for a screenshot.

What happens for each kind of email

This endpoint is only for end-user accounts your agent manages — never for your own agent login. Confirmed by testing: a brand-new email works cleanly and returns a real login link. Your own ChatSyncs login email will always fail with "User is already registered under another agent." — that’s expected, not a bug. To log into your own account, just use your normal password at platform.chatsyncs.com; this API has no use for that.

Get Direct Login URL vs. New Users Only

Query Parameters

apiToken
string
required

Your ChatSyncs API key (not a WhatsApp/Meta access token). Where to find it.

Example:

"API-KEY"

email
string
required

The user's email.

Example:

"user@example.com"

name
string

The user's name.

mobile
string

The user's phone number.

package_id
integer

The package ID to assign. Required when creating a new user. Where to find it.

expired_date
string

Package expiry date, e.g. 2026-05-05. Required when creating a new user.

status
string

User status — active (1) or inactive (0).

create_on_fail
string

Set to 1 to create a new user if none is found, or 0 to return a 'User not found' error.

Response

200 - application/json

On success, message is an object with email, password, login_url, and direct_login_url — not a plain string.

status
string

"1" = success, "0" = failure.

message
any

On success: an object with email, password, login_url, direct_login_url. On failure: a plain error string.