Get a link that signs a user in
POST
/api/v1/login-token
Creates a one-time token and the link that uses it. Opening the link signs the user in to the web interface, once, without a password.
With a customer's token, the link signs in the owner of that token. With an admin
token, customer_uid names the customer to sign in as.
Request body application/x-www-form-urlencoded
customer_uid
string
Admin token only. The customer to sign in as; the admin must be allowed to log in as this customer.
Responses
200
The one-time token and the link.
401
The token is missing or wrong (
Unauthenticated.), or its user may not act on
this object (Unauthorized). Without the Accept: application/json header, a
missing or wrong token answers with a redirect to the sign-in page instead.
404
No customer has this
customer_uid.
Get a link that signs a user in
1
2
3
4
curl -X POST 'https://your-domain/api/v1/login-token' \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
--data-urlencode 'customer_uid=6adaabb568fda'
1
2
$client = new Acelle\Client('https://your-domain/api/v1', 'YOUR_API_TOKEN');
$client->loginToken();
Response
{
"token": "6af7d91dd5d06a3c5e1f",
"url": "https://your-domain/login/token/6af7d91dd5d06a3c5e1f"
}