whois
endpoint
This endpoint takes in an authorization token and returns an object with limited public user information. If the email
scope was also requested, this endpoint will have an email
property too.
A request following this format:
GET https://galaxy.click/api/oauth/whois
Authorization: Bearer AUTH_TOKEN_HERE
Will return a response in this format:
{
"id": 1,
"name": "yhvr",
"pfpTimestamp": 1733707565493,
"email": "see previous paragraph for notes"
}
Or, if there was an error:
{
"message": "(Specific error message)"
}
profile picture urls
Galaxy serves profile pictures in the webp format in 3 different sizes: 256x256, 64x64, and 16x16. These have the codes of large
, medium
, and small
respectively.
A profile picture image is stored at the URL https://galaxy.click/pfp/[SIZE]/[USERID]-[PFPTIMESTAMP].webp
, where [SIZE]
is one of the three values defined above, [USERID]
is the user’s id, and [PFPTIMESTAMP]
is the pfpTimestamp
property. Whenever the user changes their profile picture, this value will change, and the old image will be deleted.
pfpTimestamp
property in the example above is possibly undefined. In such a case, the image URL is https://galaxy.click/pfp/[SIZE]/[USERID].webp
.
unauthenticated user information
Since authentication tokens only stay valid for 600 seconds, but your own authentication system probably keeps people logged in longer than that, you can make requests to the public user info endpoint to keep user info up-to-date.
A request following this format:
GET https://galaxy.click/api/users/info?id=1
Will return a response in this format:
{
"message": "yes",
"user": {
"name": "yhvr",
"id": 1,
"bio": "[...]",
"flairs": ["none", "owner", "..."],
"equippedFlair": "owner",
"playMinutes": 100000,
"lastHeartbeat": 1735425793477,
"modLevel": 3,
"pfpTimestamp": 1733707565493
}
}