Authentication

Get a token

Make a POST request to https://oauth.nightzookeeper.com/oauth/token

with the following information application/x-www-form-urlencoded:

  • username: Account username
  • password: Account password
  • client_id: ijosdjia0asdasd0asda09
  • grant_type: password

If the credentials provided are correct you should get an object like this:

{
"user": {
"_id": "XXX",
"username": "XXX",
"type": "XXX",
"sharedSecretKey": "XXX"
},
"accessToken": "XXX",
"accessTokenExpiresAt": "XXX",
"refreshToken": "XXX",
"refreshTokenExpiresAt": "XXX"
}

Make queries

You can then use the accessToken to query https://graphql.nightzookeeper.com/graphql. Just set the Authorization header like this:

  • Authorization: Bearer ACCESS_TOKEN