POST /authenticate

The Authenticate endpoint is the starting place for calls into this API. Sending a valid username and password to this https endpoint will return a JWT to be used as Authorisation for all subsequent requests.

Body

Remember to include the below in the body of the request as x-www-form-urlencoded. Important: Be sure to target this endpoint using https and not http. Any requests to http will be rejected.

  • password string Required
  • email string Required

Responses

  • 200

    The response will contain a confirmation of the result "message" along with the accessToken as a JWT to use in subsequent requests to this API.

    Hide response attributes Show response attributes object
    • message string
    • timestamp integer
    • accessToken string
    • token-id integer
POST /authenticate
curl \
 -X POST https://api.gift-stream.com/authenticate \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'email=user%40domain.com&password=supersecurepassword'
Request example
{
  "email": "user@domain.com",
  "password": "supersecurepassword"
}
Request examples
{
  "password": "supersecurepassword",
  "email": "user@domain.com"
}
Response examples (200)
{
  "message": "OK",
  "timestamp": 1670950565,
  "accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NzA5NTA1NjUsImlzcyI6ImFwaS5naWZ0Y2FyZC5hcHBkZWxpdmVyYW5jZS5jb20iLCJuYmYiOjE2NzA5NTA1NjUsImV4cCI6MTY3MTIwOTc2NSwidXNlck5hbWUiOiJjaHJpc0BpaXM5LmNvLnVrIiwiY2xpZW50SWQiOiIyIiwicmVmcmVzaC10b2tlbiI6ImV5SjBlWEFpT2lKS1YxUWlMQ0poYkdjaU9pSklVelV4TWlKOS5leUpwWVhRaU9qRTJOekE1TlRBMU5qVXNJbWx6Y3lJNkltRndhUzVuYVdaMFkyRnlaQzVoY0hCa1pXeHBkbVZ5WVc1alpTNWpiMjBpTENKdVltWWlPakUyTnpBNU5UQTFOalVzSW5WelpYSk9ZVzFsSWpvaVkyaHlhWE5BYVdsek9TNWpieTUxYXlJc0ltTnNhV1Z1ZEVsa0lqb2lNaUlzSW5SdmEyVnVMWFI1Y0dVaU9pSlNSVVpTUlZOSUluMC5fRnFJU294Qk5Kd2RSdU9fZlNWUWFaYWotRWFnZ1J4VG5NZzl2VFdRbVFPcGtQVWZNQjRHdmhxRXIxeldLMV9qUlRlaU9IckJkdmhtcUZ2TFJkYmc4dyJ9.Ev_ny2sgzRVgR9sqjP_eFSYZq3V4aFYe1vi7MR7lc1KLDqiY32_h_SbN-6vnd26UxLsQ0wQJ2vdusVT-HhIBFA",
  "token-id": 16
}
Response examples (200)
{
  "message": "string",
  "timestamp": 42,
  "accessToken": "string",
  "token-id": 42
}