Get Direct Login URL
Generate a secure one-time login URL for a ChatSyncs user via the API, creating the user if they don’t exist. Use when a developer asks how to build single sign-on into ChatSyncs from their own platform.
create_on_fail=1, package_id, and
expired_date).
What happens for each kind of email
| Situation | Result |
|---|---|
| Email doesn’t exist anywhere yet | Creates it (needs create_on_fail=1 + package_id + expired_date), returns a login link |
| Email already exists, under your own agent | Returns a login link for that existing account — no error |
| Email already exists, under a different agent | {"status":"0","message":"User is already registered under another agent."} |
| Your own agent/owner email | Same error as above — your account isn’t a sub-user created via this API, so this endpoint can never generate a link for it |
Get Direct Login URL vs. New Users Only
| Get Direct Login URL | Get Direct Login URL (New Users Only) | |
|---|---|---|
| Email is new | Creates the account, returns a login link | Creates the account, returns a login link |
| Email already exists (under your agent) | Returns a login link — no error | Fails — "User already existed" |
| Use it for | Any normal “log in” button — works for new and returning customers | Sign-up forms only — guarantees you never log into an existing account by mistake |
Query Parameters
Your ChatSyncs API key (not a WhatsApp/Meta access token). Where to find it.
"API-KEY"
The user's email.
"user@example.com"
The user's name.
The user's phone number.
The package ID to assign. Required when creating a new user. Where to find it.
Package expiry date, e.g. 2026-05-05. Required when creating a new user.
User status — active (1) or inactive (0).
Set to 1 to create a new user if none is found, or 0 to return a 'User not found' error.

