Login a customer

Logs in a customer.

SecuritySecretApiKey or JWT or PublishableApiKey
Request
Request Body schema: application/json

AuthenticationToken resource.

username
required
string

Username associated with the authentication token.

password
required
string <password>

Password associated with the authentication token.

mode
string
Default: "password"

Specifies the authentication verification method. The password token requires the user to enter a password to log in. The passwordless token, requires a secret API key to log in. To obtain an API key, see Manage API keys.

expiredTime
string <date-time>

Date and time at which the token expired.

otpRequired
boolean

Specifies whether a One-Time Password (OTP) is required to exchange the authentication token.

Responses
201

Login successful.

Response Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
username
required
string

Username of the customer who is associated with the authentication token.

customerId
string <= 50 characters

Customer resource ID. Defaults to UUID v4.

token
string

Authentication token identifier string.

otpRequired
boolean

Specifies whether a One-Time Password (OTP) is required to exchange the authentication token.

credentialId
string <= 50 characters

ID of the user associated with the authentication token.

expiredTime
string <date-time>

Date and time at which the token expired.

Array of objects (Self) non-empty

Related resource links.

Array (non-empty)
href
required
string

Link URL.

rel
required
string

Type of link.

Value: "self"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

422

Invalid data was sent.

post/authentication-tokens
Request samples
application/json
{
  • "username": "string",
  • "password": "pa$$word",
  • "mode": "password",
  • "expiredTime": "2019-08-24T14:15:22Z",
  • "otpRequired": true
}
Response samples
application/json
{
  • "username": "string",
  • "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "token": "string",
  • "otpRequired": true,
  • "credentialId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "expiredTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}