Developer Center

CreateClientSsoToken

This action creates a one-time, automatic login link for the user ID you specify.

The duration of the generated connection is limited to "60 seconds".

Please also note that two-factor authentication (2FA) and CAPTCHA verification steps will not be applied during the login process.

Method / Endpoint

POST/ {{API_URL}} Clients/CreateClientSssoToken

Request Parameters

Parameter Name Type Requirement Description
user_id Integer Yes The user's "users.id" in the database.
destination URL or String No The values that this field can take are explained below.
destination_values Array No The values that this field can take are explained below.
External Sample
curl --location 'https://example.com/api/Clients/CreateClientSsoToken' \
--header 'Content-Type: application/json' \
--header 'Apikey: [YOUR_API_KEY]' \
--data '{
    "user_id": 18,
    "destination": "ac-ps-products",
    "destination_values" : []
}'
Internal Sample
Helper::Load("Api");
try {
    $result = Api::Clients()->CreateClientSsoToken([
        'user_id' => 18,
        'destination' => "ac-ps-products",
        'destination_values' => []
    ]);

    print_r($result);
}
catch (Exception $e)
{
    echo 'Error: '.$e->getMessage();
}
Sample JSON Response
{
    "status": "successful",
    "data": {
        "token": "QXU0K254M3c0L0Evdm0wSUFNaEsrZ0NoaWRmNE5BVnlWc3g3MjUwZ1pKSTRjU21oOExhWGROQnBtUDFPWDhzUmlHeitSOEFOZmxOcWI5Z0lBWFFjMHBscC8xQU1mMTJpdWx0M2FQU1krenMrdW9IVGlmZk9kZUdkbTVveElPSmZoUkpVNVUrVHhXZG5YQmpKSW1rWkRSM0ROaTQvNXpvZVcxL09qTnVHWW5icS85RkE0YmFSQXorTmlpUHV4cE54aWlNQWdzaDN0L1ZLQ3BFWlpzL2FWdz09",
        "url": "https://example.com/en/sign-in?sso_token=QXU0K254M3c0L0Evdm0wSUFNaEsrZ0NoaWRmNE5BVnlWc3g3MjUwZ1pKSTRjU21oOExhWGROQnBtUDFPWDhzUmlHeitSOEFOZmxOcWI5Z0lBWFFjMHBscC8xQU1mMTJpdWx0M2FQU1krenMrdW9IVGlmZk9kZUdkbTVveElPSmZoUkpVNVUrVHhXZG5YQmpKSW1rWkRSM0ROaTQvNXpvZVcxL09qTnVHWW5icS85RkE0YmFSQXorTmlpUHV4cE54aWlNQWdzaDN0L1ZLQ3BFWlpzL2FWdz09"
    }
}

Response Parameters

Parameter Name Type Description
status String Action Status "successful" or "error".
message String Error message if the action status is "error".
data.token String Token information to check the user's session information.
data.url String The URL address prepared to redirect the user.

Destination

  • This field is used to specify the address to which the user will be redirected when entering the one-click login link.
  • If you do not define it, it will redirect to the customer panel homepage.
  • If you define a URL address, it will be redirected to the URL address you specify.
  • The values that the "destination" parameter can take are described in the table below.
Name Values Description
home   Homepage
license   License Verification
news   News
articles   Articles
articles_category categories_lang.route Post Category
references   References
references_category categories_lang.route Reference Category
normal_detail pages_lang.route Page detail
news_detail pages_lang.route News detail
articles_detail pages_lang.route Post detail
software_detail pages_lang.route Software product detail
newsletter-send   Sign up for e-newsletter
kbase   Knowledge base
kbase_category categories_lang.route Knowledge base category
kbase_detail knowledgebase_lang.route Knowledge base detail
products 'hosting','server','categories_lang.route' Product category
softwares   Softwares
softwares_cat categories_lang.route Software Category
domain   Domain Name
international-sms   International SMS
contact   Contact Page
sign-up   Register
sign-in   Login
sign-out   Logout
sign-forget   Reset Password
my-account   Client Area
ac-ps-info   Account Detail
ac-ps-balance   Account Credit
ac-ps-invoices   Invoices
ac-ps-detail-invoice invoices.id Invoice Detail
ac-ps-messages   Messages
ac-ps-message-d mail_logs.id Message Detail
ac-ps-tickets   Support Tickets
ac-ps-creq-ticket   Create Support Ticket
ac-ps-detail-ticket tickets.id Support Ticket Detail
ac-ps-products   All Existing Services
ac-ps-products-t 'hosting','server','domain','software',special-(categories.id)' Services for Existing Product Group
ac-ps-product users_products.id Existing Service Detail
ac-ps-sms   Client Area > International SMS
order-steps [ (hosting, server,domain,software,special), (products.id or pages.id is only for software)] Order Stages
basket   Cart
basket-payment   Cart Payment Options
basket-pay   Cart Checkout Page
pay-successful   Payment Completed
pay-failed   Payment Failed
contract1   Service and Use Agreement
contract2   Personal Data and General Privacy Policy
sitemap.xml   Sitemap
affiliate-link users_affiliates.id Affiliate referral link
ValidateClient

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top