You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

REQUEST

This API is used to authenticate the client by using admin credentials. In Portal, after logging in as Admin then go to see Client details, you can see login as client button.

This API uses the admin token to log in as the client.

The structure of API as below:

POST/auth/as_client

HEADER

The request requires you given the Admin Token in headers. If you don't give the Token in headers or wrong Token, the return "error_message" is "Authentication Error" and the request is failed. To get the Token, please refer Authenticate User for more details.

{
	"accept": "application/json",
	"X-Auth-Token": "Admin Token"
}

JSON RESPONSE

There is message return as JSON format. It will return the result of API and the related information as well. If successful, see the example as below:

{
 	"success": true/false,
  	"payload": { Related Information of the User }
 	"token":"User Token",
   	"cdr_api_token": "cdr_api_token"
}

On this page:

 

  • No labels