Generate one-time password
https://app.iteras.dk/api/customers/generateonetimepassword/
The /api/customers/generateonetimepassword/ endpoint generates a one-time password for a customer. A one-time password can be used instead of a password when authenticating the customer. It can only be used for authentication once and only within 20 minutes after being generated.
Parameters
-
id string requiredID of the customer to generate a one-time password for.
-
send boolean Defaults to
trueSet this tofalseto prevent an email being sent to the customer with the one-time password. -
business_entity stringExternal ID of the business entity inside Iteras to send the email from. Required if you want an email to be sent to the customer.
If a one-time password has been requested for the customer too many times within a time limit no new one-time password is generated and an error is returned.
Examples
Generate a one-time password and email it to the customer:
POST /api/customers/generateonetimepassword/ HTTP/1.1
Content-Type: application/json{
"id": "12345",
"send": true,
"business_entity": "DKbranch"
}The endpoint returns the one-time password:
{ "onetime_password": "762195" }
Errors
Invalid requests due to programming error, e.g. invalid JSON, returns 400.
This also covers requesting send without a
business_entity.
A well-formed operation where a supplied value is invalid is not executed and returns an HTTP 422 error. Errors that are not specific to a field are returned with the empty string as key:
{
"": ["Too many attempts generating one-time password"]
}
This also covers an unknown business_entity.