REST API
HTTPS and JSON. Base URL https://api.reanstudios.com. Social endpoints take an access token as a Bearer token.
REAN ID
| Endpoint | Guide | |
|---|---|---|
GET reanstudios.com/oauth/authorize | Browser sign-in | Parameters |
POST /api/oauth/token | Codes, refresh, device, launcher | Tokens |
POST /api/oauth/device | Device code | Device |
POST /api/oauth/revoke | Revoke a refresh token | Revoke |
GET /api/oauth/userinfo | OpenID claims | Claims |
GET /api/oauth/jwks | Signing keys | |
GET /.well-known/openid-configuration | Discovery | Discovery |
Token grants
| grant_type | Extra fields | Notes |
|---|---|---|
authorization_code | code, redirect_uri, code_verifier | Code from /oauth/authorize (5 min, single use). |
refresh_token | refresh_token, scope? | Rotates the refresh token. |
urn:ietf:params:oauth:grant-type:device_code | device_code | Poll at the given interval. |
urn:rean:params:oauth:grant-type:launcher_code | code | From -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
/api/v1/me{ "id": "4f9c…", "username": "nova", "displayName": "Nova", "avatarUrl": null, "email": "nova@example.com" }email is present only with the email scope.
Friends
/api/v1/friendsResponse: { friends: Friend[] }. Each friend has id, username, displayName, avatarUrl, friendsSince, plus presence with presence.read. See example.
Presence
/api/v1/presence?ids=<id>,<id>Up to 100 ids. Response: { presence: [{ playerId, status, activity }] }. Non-friends read as offline.
/api/v1/presenceBody: activity fields. Response: { ok: true, expiresIn: 120 }. Limit: 120 per player per 10 minutes.
/api/v1/presenceClears the presence your app set.
Invites
/api/v1/invitesPending, unexpired invites the player received in your app: { invites: [{ id, from, message, joinSecret, createdAt, expiresAt }] }.
/api/v1/invites| Name | Type | Description |
|---|---|---|
torequired | uuid | A friend's player id. |
joinSecret | string ≤ 256 | Given to the friend when they accept. |
message | string ≤ 140 | Shown with the invite. |
Response: { invite: { id, to, expiresAt } }. Errors: 403 not_friends, 429 after 30 invites in 10 minutes.
/api/v1/invites/respondBody { id, accept }. Response { ok: true, joinSecret? }. 410 expired if it expired or was already answered.
Events
/api/v1/events?after=<cursor>Response: { events: [{ id, type, data, createdAt }], cursor }, oldest first, at most 100. Pass cursor back as after.