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 Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
id
string <= 50 characters

The session ID.

token
string

The session's token used for authentication.

createdTime
string <date-time>

Session created time.

updatedTime
string <date-time> (UpdatedTime)

Read-only timestamp. This value updates when the resource is updated.

expiredTime
string <date-time>

Session expired time. Defaults to one hour.

401

Unauthorized access. Invalid credentials 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"
}