Basic token based Auth

POST /auth/signin

Signin with username and password, you will receive a token which u will have to provide in the header of subsequent requests at /api gateway

Body Required

username and password input

  • password string
  • username string

Responses

  • 200

    OK

    Hide response attributes Show response attributes object
    • data object
      Hide data attributes Show data attributes object
      • createdAt string
      • token string
      • userId integer
      • username string
    • status string
    • status_code integer
  • 400

    Bad Request

    Hide response attributes Show response attributes object
    • message string
    • status string
    • status_code integer
  • 401

    Unauthorized

    Hide response attributes Show response attributes object
    • message string
    • status string
    • status_code integer
  • 404

    Not Found

    Hide response attributes Show response attributes object
    • message string
    • status string
    • status_code integer
  • 500

    Internal Server Error

    Hide response attributes Show response attributes object
    • message string
    • status string
    • status_code integer
POST /auth/signin
curl \
 -X POST http://api.example.com/auth/signin \
 -d '{"password":"string","username":"harshtalks"}'
Request example
{
  "password": "string",
  "username": "harshtalks"
}
Request examples
{
  "password": "string",
  "username": "harshtalks"
}
Response examples (200)
{
  "data": {
    "createdAt": "string",
    "token": "string",
    "userId": 42,
    "username": "string"
  },
  "status": "success",
  "status_code": 200
}
Response examples (200)
{
  "data": {
    "createdAt": "string",
    "token": "string",
    "userId": 42,
    "username": "string"
  },
  "status": "success",
  "status_code": 200
}
Response examples (400)
{
  "message": "internal server error",
  "status": "error",
  "status_code": 500
}
Response examples (400)
{
  "message": "internal server error",
  "status": "error",
  "status_code": 500
}
Response examples (401)
{
  "message": "internal server error",
  "status": "error",
  "status_code": 500
}
Response examples (401)
{
  "message": "internal server error",
  "status": "error",
  "status_code": 500
}
Response examples (404)
{
  "message": "internal server error",
  "status": "error",
  "status_code": 500
}
Response examples (404)
{
  "message": "internal server error",
  "status": "error",
  "status_code": 500
}
Response examples (500)
{
  "message": "internal server error",
  "status": "error",
  "status_code": 500
}
Response examples (500)
{
  "message": "internal server error",
  "status": "error",
  "status_code": 500
}