Authenticate a user with the email and password that they provided when registering.
Given that the user credentials are correct, this returns a token that can then be used to authorise other secured operations. In case the password is expired, a temporary token is returned, which can be used solely for updating the password.
The token returned is valid for 5 minutes from last activity.
Security
api-key
The user's password or passcode used to log in a user. Passwords must be:
- minimum 8 characters for end-users (Consumers and Corporates); 12 characters for others
- maximum 30 characters
- include a lowercase character
- include an uppercase character
- include a digit and a special character
- different from any of the 5 last such passwords used.
For non-PCI compliant integrations, the password submitted must be tokenised.
- Weavr Sandbox Environmenthttps://sandbox.weavr.io/multi/login_with_password
- Mock serverhttps://api.weavr.io/_mock/products/multi/openapi/login_with_password
import requests
url = "https://sandbox.weavr.io/multi/login_with_password"
payload = {
"email": "user@example.com",
"password": {
"value": "pa$$word"
}
}
headers = {
"Content-Type": "application/json",
"api-key": "YOUR_API_KEY_HERE"
}
response = requests.post(url, json=payload, headers=headers)
data = response.json()
print(data)Response
{ "token": "string", "tokenType": "NO_TYPE", "identity": { "type": "CONSUMER", "id": "string" }, "credentials": { "type": "ROOT", "id": "string" } }