UserInfo Endpoint

The userinfo endpoint is at https://hub.spookysrv.com/index.php?route=/api/v2/oauth2/userarrow-up-right

circle-info

We only accept a GET request at the UserInfo Endpoint

Content Type must be application/json

Request

Pass the access token in the Authorization header with type Bearer

Header Format: Authorization: Bearer [access token]

Example CURL Request:

curl -X GET "https://hub.spookysrv.com/index.php?route=/api/v2/oauth2/user" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer kMV0a7ZbUlCsKk6lVH8T6pYV8u8Rn3toB4EocqS8c"

Response

A JSON Response will be returned in the following format:

{
  "id": 1, // User ID
  "username": "Username",
  "email": "[email protected]",
  "avatar": "https://hub.spookysrv.com/uploads/avatars/1.png?v=1688027357",
  "sub": 1, // Same as `id`, only included if token has `openid` scope
  "groups": [{ "id": 2, "name": "Admin", "order": 1 }],
  "integrations": [
    {
      "integration": "Discord",
      "identifier": "XXXXXXXXXXXXXXX",
      "username": "XXXXXXXXX",
      "verified": true,
      "linked_date": 11111111 // UNIX Timestamp
    },
    {
      "integration": "Google",
      "identifier": "XXXXXXXXXX",
      "username": "XXXXXXXX",
      "verified": true,
      "linked_date": 11111111 // UNIX Timestamp
    }
  ]
}
circle-info

Text behind // are comments and not included in the response itself

Last updated