Definition for all the routes
Retrievies basic user profile. Includes email if email scope is set.
id - user’s IDnickname - user’s nicknamedisplayName - user’s display nameavatar - user’s avatar URLregistration - user’s registration date (ISO date)email - user’s email (requires email scope)permissions - the user’s bit permissions.tfa - whether the user has 2FA active or not.address - the user’s address (requires address scope)names - contains JSON object with first, last, full (display name) and list (array of strings of all names) (requires full_name scope)birth - the user’s birth date (ISO date) (requires birth scope)occupation - the user’s occupation (requires occupation scope)role - user’s role in occupation (requires occupation scope)Logs out current user
done - always trueEdits the user profile.
nickname - user’s nicknamedisplayName - user’s display namenames - same as in profile (requires full_name scope)avatar - user’s avatar URLemail - user’s email (requires email scope; internal only)tfa - false or 2fa secret. (internal only)tfaCode - 2fa code, when 2fa was turned on. (internal only)birth - user’s birth date (internal only)occupation - user’s occupation (internal only)role - user’s role (internal only)(2fa off or unchanged)
done - true(2fa turned on)
done - truebackupCodes - array of strings of backup codes for 2FA.Jem supports multiple accounts at once. This endpoint is used by internal apps to allow changing the currently ‘active’ user.
loged - Loged in users, array of objects in the same format as profile.expired - Expired users, array of objects in the same format as profile.Retrievies a list of connected accounts. Requires the accounts scope. Includes email if email scope is set.
Array of the following object:
platform - The platforms name (might be duplicate in the array)id - The ID of the user on the platform (string; depends on platform)username - The username of the user on the platformavatar - User’s avatar (profile picture) on the platformemail - The email of the user on the platform (requires email scope, may be missing).Returns access token without refresh token (use this endpoint again). Request cannot be scoped.
scopes - The required scopestoken - The access tokenexpires_in - When the token expires in seconds, defaults to one week.Returns the single acount. Requires accounts scope on account owner. Returns not found when user doesn’t have access to account.
username - The username of the user on the platformemail - The email of the user on the platform (requires email scope, may be missing)Disconnects the account from current user, removing it from Jem.
done - always trueReturns a list of connected (authorized) applications.
id- app IDowner - owner IDname - Application namedescription - Application descriptionicon - Application iconscopes - List of scopes the user has authorizedcreatedAt - The date at which the authorization was first set (if scopes were updated later, this field doesn’t change).Removes the connection and the application authorization.
Returns a list of applications owned by user.
id - App’s IDowner - The ID of owner (user ID)name - Applications namedescription - The description of the applicationicon - The icon of the applicationcallbacks - List of URLs that can be used for callbacksallowImplicit - Whether implicit tokens are supported or notinternal - Whether the app is internal or notdomains - List of domains (used by internal apps)Returns single application
id - App’s ID (used as public key)owner - The ID of owner (user ID)name - Applications namedescription - The description of the applicationicon - The icon of the applicationcallbacks - List of URLs that can be used for callbacksallowImplicit - Whether implicit tokens are supported or notinternal - Whether the app is internal or notdomains - List of domains (used by internal apps)secret - The applications secretDeletes owned application
done - always true, else errorCreates a new application. Other fields can be updated using PATCH method.
name - The application’s name. Alphanumeric 3 to 32 characters.Updates application. All fields are optional, those that are set will overwrite old values.
name - The application’s name. Alphanumerical, 3 to 32 characters.description - The application’s description. Max 256 characters.icon - The icon of the applicationcallbacks - List of usable callback URLsallowImplicit - Whether implicit grant is availableinternal - Whether app is internal or not (requires user to have CREATE_INTERNAL permission)domains - The domains to be used with internal applications.secret - A boolean whether to regenerate secret or not. Regenerating invalidates old secrets.Returns list of platforms.
name - Platform’s namedisplayName - Platform’s display namecolor - Platform’s base colorbg - Platform’s background coloricon - Platform’s icon, as URL.Redirects user to login using specified platform. After the user logs in, redirects to redirect_uri
Scopes parameter is ignored, includes all scopes by default. If user has 2FA, user will be first asked to fill 2FA on Jem before being redirected back.
When user logins for the first time, will get redirected to Jem to fill their account and finish registration before going back.
client_id - The application that wants to login. Must be internal application. Empty for Jem frontend.redirect_uri - Where to redirect back. Must be URL registered with the application.state - The state that will be sent back.response_type - code or token, as in OAuthUsed as callback to given platform’s OAuth2 callback. Not to be used by any clients. Requires state cookie. Redirects to redirect_uri.
Not callable directly.
Gets state data (simple info about the account user is trying to connect).
username the account’s usernamesub sub text (the numbers in discord, for example)emailid account idplatformDeletes current state info, effectively cancelling account connection
Used after user confirms their choice to connect account, create a new account or similar.
If you want to set other fields, PATCH /user/@self/profile or PATCH INTERNAL after account creation.
account - Jem account to connect the platform account to. Null (explicit null) to create new account.rest only if creating new account:
nickname - Nickname of choice of the userdisplayName - Display name, if different from nicknameSee /user/@self/profile.
Authorizes the application (:client is application ID).
scope - The allowed scopesredirect_uri - The selected redirect uristate - State the app senttype - Response typeuri - URI to redirect toReturns the signed firebase token
Returns signed supabase token.
User ID won’t exist in the users table, but RLS will still be usable.
Expiration time is set to 2 hours.