Skip to content

Acquire auth token

Request

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
apiKey
Bodyapplication/jsonrequired
emailstring, (email)required

E-mail Address of the user

passwordobjectrequired

The user's password or passcode used to log in a user. Passwords must be:

  • between 8 and 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.

curl -i -X POST \
  https://sandbox.weavr.io/payment-run/v1/login_with_password \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY_HERE' \
  -d '{
    "email": "user@example.com",
    "password": {
      "value": "pa$$word"
    }
  }'

Responses

OK

Headers
request-refstringrequired

A request identifier. Providing this reference when contacting our support team will help us investigate your query.

Bodyapplication/json
tokenstring

An authorisation token (valid for 5 minutes from last activity) identifying the user to be used in the auth_token authorization header for secured operations.

tokenTypestring

The auth token received can only be used to access the following endpoints:

  • /identities
  • /access_token
Enum:"AUTH""ACCESS"
identityobject

The identity to which the logged-in user belongs to.

credentialsobject

The unique identifier for the logged-in user.

Response
{ "token": "string", "tokenType": "AUTH", "identity": { "type": "BUYER", "id": "string" }, "credentials": { "type": "ADMIN", "id": "string" } }