REST API

HTTPS and JSON. Base URL https://api.reanstudios.com. Social endpoints take an access token as a Bearer token.

REAN ID

EndpointGuide
GETreanstudios.com/oauth/authorize
Browser sign-inParameters
POST/api/oauth/token
Codes, refresh, device, launcherTokens
POST/api/oauth/device
Device codeDevice
POST/api/oauth/revoke
Revoke a refresh tokenRevoke
GET/api/oauth/userinfo
OpenID claimsClaims
GET/api/oauth/jwks
Signing keys
GET/.well-known/openid-configuration
DiscoveryDiscovery

Token grants

grant_typeExtra fieldsNotes
authorization_codecode, redirect_uri, code_verifierCode from /oauth/authorize (5 min, single use).
refresh_tokenrefresh_token, scope?Rotates the refresh token.
urn:ietf:params:oauth:grant-type:device_codedevice_codePoll at the given interval.
urn:rean:params:oauth:grant-type:launcher_codecodeFrom -ReanAuthCode (5 min, single use).

Client authentication: HTTP Basic (client_id:client_secret) or client_secret in the body for confidential apps; client_id only for public apps.

Me

GET/api/v1/mescope profile
json
{ "id": "4f9c…", "username": "nova", "displayName": "Nova", "avatarUrl": null, "email": "nova@example.com" }

email is present only with the email scope.

Friends

GET/api/v1/friendsscope friends.read

Response: { friends: Friend[] }. Each friend has id, username, displayName, avatarUrl, friendsSince, plus presence with presence.read. See example.

Presence

GET/api/v1/presence?ids=<id>,<id>scope presence.read

Up to 100 ids. Response: { presence: [{ playerId, status, activity }] }. Non-friends read as offline.

POST/api/v1/presencescope presence.write

Body: activity fields. Response: { ok: true, expiresIn: 120 }. Limit: 120 per player per 10 minutes.

DELETE/api/v1/presencescope presence.write

Clears the presence your app set.

Invites

GET/api/v1/invitesscope invites

Pending, unexpired invites the player received in your app: { invites: [{ id, from, message, joinSecret, createdAt, expiresAt }] }.

POST/api/v1/invitesscope invites
NameTypeDescription
torequireduuidA friend's player id.
joinSecretstring ≤ 256Given to the friend when they accept.
messagestring ≤ 140Shown with the invite.

Response: { invite: { id, to, expiresAt } }. Errors: 403 not_friends, 429 after 30 invites in 10 minutes.

POST/api/v1/invites/respondscope invites

Body { id, accept }. Response { ok: true, joinSecret? }. 410 expired if it expired or was already answered.

Events

GET/api/v1/events?after=<cursor>any scope

Response: { events: [{ id, type, data, createdAt }], cursor }, oldest first, at most 100. Pass cursor back as after.