GXS Internal
Identity serverAPI reference

Username

/sign-in/username

POST
/sign-in/username

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
username*string

The username of the user

password*string

The password of the user

rememberMe?boolean

Remember the user session

callbackURL?string

URL to redirect to after sign in (also used as the redirect target for email verification when required)

Response Body

Success

application/json
  1. response
redirect*boolean

Whether the client should follow the Location header. True when callbackURL was provided.

token*string

Session token for the authenticated session

url?string

The callbackURL echoed back so the client can redirect.

user*
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/sign-in/username' \  -H 'Content-Type: application/json' \  -d '{  "username": "string",  "password": "string"}'
{  "redirect": true,  "token": "string",  "url": "string",  "user": {    "id": "string",    "name": "string",    "email": "string",    "emailVerified": false,    "image": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "username": "string",    "displayUsername": "string",    "twoFactorEnabled": false,    "role": "string",    "banned": false,    "banReason": "string",    "banExpires": "2019-08-24T14:15:22Z",    "lastLoginMethod": "string",    "phoneNumber": "string",    "metadata": null,    "emailOtpEnabled": false  }}

/is-username-available

POST
/is-username-available

Authorization

bearerAuth
headerAuthorizationBearer <token>

Bearer token authentication

Request Body

application/json
  1. body
username*string

The username to check

Response Body

Bad Request. Usually due to missing parameters, or invalid parameters.

application/json
  1. response
message*string
curl -X POST 'https://dev.auth.graphxserver.io/api/auth/is-username-available' \  -H 'Content-Type: application/json' \  -d '{  "username": "string"}'
{  "message": "string"}