Authentication

Create a session with username and password

Create a session with username and password.

SecurityPublishableApiKey
Request
Request Body schema: application/json
username
required
string

Username.

password
required
string

Password.

Responses
201

Account logged in.

Response Schema: application/json
id
string <= 50 characters

The resource ID. Defaults to UUID v4.

token
string

The session's token used for authentication.

createdTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

updatedTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

expiredTime
string <date-time>

Session expired time. Defaults to one hour.

401

Unauthorized access, invalid credentials were used.

post/login
Request samples
application/json
{
  • "username": "string",
  • "password": "string"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "token": "string",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "expiredTime": "2019-08-24T14:15:22Z"
}

Destroys the user's current session

Destroys the user's current session.

SecurityCustomerJWT
Responses
204

Account logget out.

401

Unauthorized access, invalid credentials were used.

post/logout
Request samples
curl -i -X POST \
  https://api-sandbox.rebilly.com/storefront/logout \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'
Response samples
application/json
{
  • "status": 401,
  • "title": "string",
  • "detail": "string",
  • "instance": "string"
}