Checks if customer account exists in Cleeng database, creates it if necessary, then returns URL that can be used to purchase an offer - without log in step required.

Only for enterprise accounts. Are you intrested in enterprise account? Please contact Us
Remote Authentication
Remote authentication is a process that allows integration between Cleeng customer accounts and users already registered on your website. It improves user experience by removing additional registration step on Cleeng Platform.

Remote authentication is initialized by making a call to prepareRemoteAuth() function. It checks if customer with given e-mail address exists in database (creating it if necessary), then returns purchase URL (offer ID should be passed in flowDescription parameter). At this moment you should redirect customer to returned URL. He will be automatically logged in, and purchase screen will show up.


Name Type Description
publisherToken string Your publisher Token. Only for enterprise accounts.
customerData object Required data about customer
-   email string
-   locale string Defines language and text formatting for the user. E.g. "en_US", "fr_FR"
-   currency string Choose one: USD, EUR, GBP, CAD, AUD, NZD, SEK, DKK, NOK, TRL, ZAR, XOF
-   country string 2-letter country code
flowDescription object
-   offerId string
-   redirectUri string
- required parameter


    "method": "prepareRemoteAuth",
    "params": {
    "publisherToken": "Xlrx-SjTLVMCsaRsOf2q2hvWKOlrF57yHknDRRRMX-13Fz-x",
    "customerData": {
    "email": "",
    "locale": "en_US",
    "currency": "USD",
    "country": "US"
    "flowDescription": {
    "offerId": "",
    "redirectUri": ""
    "jsonrpc": "2.0",
    "id": 1


    "result": {
    "url": "https:\/\/\/auth\/2\/purchase?v=2.1&popup=1&remote_token=4a05f0bd07870f4cec92456a7a38452059a4a394:6484554b9bfd9b1609a51f3dcb0b3077d5e11ab6&"
    "id": "1",
    "error": null,
    "jsonrpc": "2.0"


    $customerData = array(
    'email' => '',
    'locale' => 'en_US',
    'currency' => 'USD',
    'country' => 'US'

    $flowDescription = array(
    'offerId' => 'R123123123_US',
    'redirectUri' => ''

    $cleengApi = new Cleeng_Api();
    $cleengApi->setPublisherToken('VIJYHWzJEP4mt1DZThD7DV_FinBG0Yo3Q9oHfCFAjqA22jXP');//enterprise account required

    $remoteAuth = $cleengApi->prepareRemoteAuth($customerData, $flowDescription);

    header('Location: ' . $remoteAuth->url);

Remember! you can always check it by yourself using API Console - prepareRemoteAuth()

Back to Customer API