Gamma API
AccountSessions

Join this region

POST
/api/account/join

For a person whose account is in another region, with an access token from there: makes their guest row here, holding their name, email, language, picture, time zone, email security code and notification preferences. Until then every other request answers 403 with the code GUEST_JOIN_REQUIRED. Refused with 403 or 409 when this region finds the email address's home elsewhere or claimed by two regions, and with 503 while a region it must ask doesn't answer. For anyone else, it changes nothing.

Who may call it: Any signed-in user, for their own account. API keys: no.

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Host- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Response Body

OK.

application/json
  1. response

Who the caller is, as better-auth's session check answers it, without the session's token.

user*
session*
Example Request
curl -X POST 'http://localhost:3000/api/account/join'
Example Response
{  "user": {    "id": "string",    "name": "string",    "email": "string",    "emailVerified": true,    "image": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "role": "string",    "banned": true,    "banReason": "string",    "banExpires": "2019-08-24T14:15:22Z",    "twoFactorEnabled": true,    "userTag": "string",    "language": "string",    "chartPalette": "string"  },  "session": {    "id": "string",    "userId": "string",    "expiresAt": "2019-08-24T14:15:22Z",    "ssoDomain": "string"  }}