Loading...

Knowledge Base

Generate a Customer Authentication Token Using the API

When you want to authenticate a customer and generate a temporary authentication token using the API. This article explains the required authentication parameters, customer credential validation, IP verification, token generation process, and token validity limitations.

Generating a Token

 

Description

Authenticates a Customer by returning an authentication token on successful authentication.

Note

The token will be valid for a duration of only 120 seconds.

Parameters

NameData TypeRequired / OptionalDescription
auth-useridIntegerRequiredAuthentication Parameter
api-keyStringRequiredAuthentication Parameter
usernameStringRequiredUsername of the Customer
passwdStringRequiredPassword of the Customer
ipStringRequiredIP address of the Customer

HTTP Method

GET

Example Test URL Request

https://test.httpapi.com/api/customers/generate-token.json?auth-userid=0&api-key=key&username=username@customer.com&passwd=customerpassword&ip=1.1.1.1

Response

Returns a token (String) if the Customer is authenticated successfully.

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