Authenticating a Token passed to a Custom URL

Description

Authenticates the token provided by the system while redirecting a Customer to your custom URL and returns the Customer details, if authenticated.

Note

If you have chosen to redirect all purchase related links from within your and your Customers' Control Panel to a custom URL, you must check that the redirection is being made by an authenticated Customer or user. The authenticity can be checked using this API call.

Parameters

Name Data Type Required / Optional Description
auth-userid Integer Required Authentication Parameter
api-key String Required Authentication Parameter
token String Required Authentication Token

HTTP Method

GET

Example Test URL Request

https://test.httpapi.com/api/customers/authenticate-token-without-history.json?auth-userid=0&api-key=key&token=authenticationtoken

Response

Returns a hash map containing the below details, if the token is authenticated:

  • Customer Id (customerid)

  • Customer Username (username)

  • Your Reseller Id (resellerid)

  • Reseller Id of your Parent Reseller (parentid)

  • Name (name)

  • Company (company)

  • Email Address (useremail)

  • Telephone Number Country Code (telnocc)

  • Telephone Number (telno)

  • First line of address of the Customer (address1)

  • Second line of address of the Customer (address2)

  • Third line of address of the Customer (address3)

  • City (city)

  • State (state)

  • Country Code (country)

  • ZIP Code (zip)

  • Personal Identification Number (pin)

  • Creation Date (creationdt)

  • Current Status (customerstatus)

  • Sales Contact Name and Email Id (salesrepresentative)

  • Language Preference for the Control Panel and Emails (langpref)

  • Total Receipts (totalreceipts)

In case of any errors, a status key with value as ERROR alongwith an error message will be returned.