LogoLogo
API Status
  • 👋Welcome
  • 🌐What is Morpheus Platform?
    • Interoperability
  • â„šī¸Help
    • 📗Glossary
    • 🆘Support
    • Firewall problems
    • EULA
  • CREATION
    • 🎮Unreal Development
      • ⚡Get Started
        • âš’ī¸Download the Editor
        • âĢUpload Content
        • 🌎Creating your own map
        • 📝Morpheus Base Project
        • ❓Differences from Unreal
          • 🧍Character Configuration
        • 📡Morpheus Networking
          • Introduction to Morpheus Networking
          • Network Levels
          • Replicated Properties
          • RPCs
          • Morpheus Render Targets
          • Morpheus Array
          • Networking FAQ
          • Replicating Sublevels
      • 📚Features & Guides
        • 📒Example Plugin
          • Nameplates
          • In-game roles
          • Resizing
        • 🏊Actor Pooling
        • 🔊Audio
        • 🎭Avatars
          • Creating an Avatar
          • Attachments
            • MML Attachments
          • Custom Animation Variables
          • Importing an NFT collection
          • Capsules and Mesh Transforms
        • 🤖Bots
        • đŸŽ™ī¸Chat
          • Unreal Text Chat
        • đŸŽ›ī¸Control Panels
          • Control Panel Configuration
          • DJ booth mission control
          • Observer Controls
        • 🔉Crowd Audio
        • đŸ¤ŧCrowd Rendering
          • Legacy Animated Crowd
            • Animated Crowd Console Commands
            • Attaching static meshes to crowd members
          • Crowd Materials
          • Performance Parameters
          • Live Config Settings
          • Crowd Animation
            • Crowd Anim Blueprint
              • User Guide - Crowd Anim Blueprint
              • Reference Guide - ABP Nodes
                • Animation Playback
                • States and State Machines
                • Variables
                • Transitions
                • Special
                • Blends
                • Additional Notes
        • 🍱Helpers & Extras
          • "Instanced Objects" in Blueprints
          • Objects with "world context"
          • Making DataAsset classes
          • Duplicate Objects
          • The Bootflow Subsystem
          • The "Wait For Condition" System
          • Advanced Graphics settings
          • Listening to inputs on UObjects
          • Morpheus UserID
          • World Services
          • M2Extras: Skins System
        • đŸ–Ĩī¸Loading Screen
        • ⚡Live Config
          • Editing for a World
          • Editing Locally
          • Default Settings
          • Accessing via Blueprint
          • Adding New Settings
          • Overriding Defaults
          • Using Arrays
        • 🧊MML
        • đŸ•ēMotion Capture
        • 📡Networking
        • đŸ“ĸNotifications
        • Raycastable Crowd
        • 🌐Singletons
        • 📱Streaming & Multiplatform
          • GFN on mobile
        • đŸ–Ĩī¸UI
          • "UI Mode"
        • đŸ—ƒī¸User Collections
          • Creating a New Object Definition
          • Accessing from Unreal
            • Creating Objects Definitions
            • Transfer Objects
            • User Collection Views
            • Receiving Updates
        • đŸ“ēVideo Players
          • Embedded Video Player
          • Millicast video streaming
            • How to Setup an In-Game Video Stream
            • Picture-in-Picture mode
          • Streaming Video Player
            • How to Setup a URL Video Player
            • Picture-in-Picture mode
        • 🐞Visual Debugging
          • Inspector
        • đŸĒŸWeb UI
        • Online Services
          • KV Store Service
        • 💠Web Requests
          • Http Requests
            • Legacy HTTP Nodes
          • JSON Handling
          • WebSockets
          • Identity Validation
          • Allowed External URLs
          • Walkthrough Example
            • Example Counter Service
        • âœˆī¸World Travel
          • World Travel in the editor
        • Avatar Physics Assets
        • Action Gameplay Helper Components
      • 🔑Workflows
        • â†—ī¸Upgrade the Editor
          • đŸ–Ĩī¸Version History
        • âš™ī¸Editing Project Settings
        • 📈Profiling
        • đŸ§ēMarketplace Importing
        • đŸ› ī¸Extra Workflows
          • Setup Play-in-Editor
          • Setup Local Asset Validation
          • Adding Gameplay Tags
          • Validating Game Assets
          • Custom Connection Modes
          • Connect Editor to a World
          • Common Issues
      • 📚Useful Reading
        • ⭐Best Practices
    • 🌎Worlds
      • 📩Invite Players
        • Setting Role Groups
      • Persistent Worlds
      • Always on Worlds
    • 📅Running events
      • ✅Large scale events - Checklist
      • 👾Anti-Cheat (EAC)
      • 🎮Player Entry
        • 📱React Native
        • Steam
        • đŸ’ģHardware Reqs
      • đŸŽĨBroadcast
        • 📹OBS Integration
      • Failover
      • 🏁Capacity And Queue Management
  • ADMINS
    • đŸ‘ĒAccess Control
      • Adding metaverse contributors
      • Creating a new project
    • 💲Pricing
      • Development Support
      • Included Usage & Overages
      • Cloud Streaming
      • Access Modes
      • War Room Support
      • Platform SLA
    • âš™ī¸Settings
      • đŸ—ƒī¸Projects
  • APIs and Tooling
    • đŸ–Ĩī¸API Reference
      • Accounts
      • Events
      • Key/Value Store
      • Organizations
      • Realtime
      • User Profile
      • World Builder
      • Worlds
    • đŸ’ģTemplate Web App
      • đŸ’ĸModeration
    • Pixel Streaming
    • 🚀Launcher
  • Integrations
    • 📊Analytics
      • Sending events from web
      • 🎮Sending Events from Unreal
    • đŸ’ŦChat
      • 🎮Integrating Pubnub with your Unreal Project
      • Adding Moderation to Chat
Powered by GitBook
On this page

Was this helpful?

  1. APIs and Tooling
  2. API Reference

Accounts

The Accounts service allows you to manage user accounts registered within your organization, including creation, updates, and access control.

PreviousAPI ReferenceNextEvents

Last updated 6 days ago

Was this helpful?

đŸ–Ĩī¸

Fetch a user's account

get

Retrieves and returns the account information for the specified user. An email address and wallet address will only be returned if the user has verified them.

This API can be called by the user themselves, the Unreal server, or any user with read permissions on the organization's user profiles.

Authorizations
Path parameters
userIdstringRequired

The user ID to fetch the account for

Header parameters
x-m2-organization-idstringOptional

The ID of an organization

Responses
200
The response to querying a user's account information
application/json
get
GET /api/accounts/users/{userId}/ HTTP/1.1
Host: your-organization-id.m2worlds.io
x-api-key: YOUR_API_KEY
Accept: */*
200

The response to querying a user's account information

{
  "evmLinkedWallet": "text",
  "email": "text",
  "isGuest": true
}

Remove a user's account

delete

Removes the account information for the specified user.

This API can be called by any user with all permissions to an organization or a user who has the highest level of permissions if no organization is provided.

Authorizations
Path parameters
userIdstringRequired

The ID of a user

Header parameters
x-m2-organization-idstringOptional

The ID of an organization

Responses
204
The ID of the user to be deleted
application/json
4XX
HTTP error message
application/json
delete
DELETE /api/accounts/users/{userId}/ HTTP/1.1
Host: your-organization-id.m2worlds.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "userId": "text"
}

Fetch the requesting user's account

get

Retrieves and returns the entire account information for the user making the request.

Authorizations
Header parameters
x-m2-organization-idstringOptional

The ID of an organization

Responses
200
The response to querying a user's account information.
application/json
Responseall of

The response to querying a user's account information.

and
any ofOptional
or
objectOptional
4XX
HTTP error message
application/json
get
GET /api/accounts/users/current/ HTTP/1.1
Host: your-organization-id.m2worlds.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "name": "text",
  "pictureUrl": "text",
  "email": "text",
  "emailVerified": true,
  "evmLinkedWallet": {
    "nonce": "text",
    "address": "text",
    "verified": true,
    "coldWallets": [
      "text"
    ]
  },
  "evmWallet": {
    "nonce": "text",
    "address": "text",
    "verified": true,
    "coldWallets": [
      "text"
    ]
  },
  "emailDomain": "text",
  "isGuest": true,
  "tenantId": "text",
  "organizationId": "text"
}
  • GETGet the user authentication data
  • POSTCreate a new user account
  • POSTGenerate a custom token for a user
  • POSTRefresh token
  • POSTSign in with custom token
  • GETFetch a user's account
  • DELETERemove a user's account
  • GETFetch the requesting user's account

Get the user authentication data

get

Retrieves and returns the account information for the authenticated user.

A user ID or email must be provided as a query parameter.

Authorizations
Query parameters
userIdstringOptional

The user ID to fetch the auth account details for

emailstringOptional

The email to fetch the auth account details for

Header parameters
x-m2-organization-idstringRequired

The ID of an organization

Responses
200
The response to querying a user's account information. We return an array which will be empty if no user is found, and may contain multiple entries if the query parameter is an email.
application/json
get
GET /api/accounts/auth/user/ HTTP/1.1
Host: your-organization-id.m2worlds.io
x-api-key: YOUR_API_KEY
x-m2-organization-id: text
Accept: */*
200

The response to querying a user's account information. We return an array which will be empty if no user is found, and may contain multiple entries if the query parameter is an email.

[
  {
    "uid": "text",
    "emailVerified": true,
    "email": "text",
    "displayName": "text",
    "photoURL": "text",
    "providerData": [
      {
        "providerId": "text",
        "uid": "text",
        "email": "text",
        "displayName": "text",
        "photoURL": "text",
        "phoneNumber": "text"
      }
    ]
  }
]

Create a new user account

post

Creates a new user account in the authentication system. A custom user ID can be provided.

Authorizations
Header parameters
x-m2-organization-idstringRequired

The ID of an organization

Body

The request body for creating a new auth user

uidstringOptional

The user ID to use for this new user. If not specified, one will be created.

displayNamestringOptional

Optional for user creation, but required for streaming access

emailstringOptional
emailVerifiedbooleanOptional
photoURLstringOptional
Responses
200
The information of the created user
application/json
post
POST /api/accounts/auth/user/ HTTP/1.1
Host: your-organization-id.m2worlds.io
x-api-key: YOUR_API_KEY
x-m2-organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "uid": "text",
  "displayName": "text",
  "email": "text",
  "emailVerified": true,
  "photoURL": "text"
}
200

The information of the created user

{
  "uid": "text",
  "emailVerified": true,
  "email": "text",
  "displayName": "text",
  "photoURL": "text",
  "providerData": [
    {
      "providerId": "text",
      "uid": "text",
      "email": "text",
      "displayName": "text",
      "photoURL": "text",
      "phoneNumber": "text"
    }
  ]
}

Generate a custom token for a user

post

Generate a custom token for a user that can be used to authenticate.

Requires "*" permission on the organization and its children, and the "allowUserTokenManagement" flag to be enabled on the organization.

Authorizations
Header parameters
x-m2-organization-idstringRequired

The ID of an organization

Body

The request body for generating a custom token

userIdstringRequired

The user ID to generate a custom token for

Responses
200
The response to generating a custom token
application/json
post
POST /api/accounts/token/generate/ HTTP/1.1
Host: your-organization-id.m2worlds.io
x-api-key: YOUR_API_KEY
x-m2-organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "userId": "text"
}
200

The response to generating a custom token

{
  "token": "text"
}

Refresh token

post

Returns a new ID token and refresh token for the given user.

Requires "*" permission on the organization and its children, and the "allowUserTokenManagement" flag to be enabled on the organization.

Authorizations
Header parameters
x-m2-organization-idstringRequired

The ID of an organization

Body

The request body for refreshing a token

refreshTokenstringRequired
Responses
200
The response to refreshing a token
application/json
post
POST /api/accounts/token/refresh/ HTTP/1.1
Host: your-organization-id.m2worlds.io
x-api-key: YOUR_API_KEY
x-m2-organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "refreshToken": "text"
}
200

The response to refreshing a token

{
  "idToken": "text",
  "refreshToken": "text",
  "expiresIn": "text",
  "userId": "text"
}

Sign in with custom token

post

The endpoint signs in or signs up a user by exchanging a custom Auth token for an ID token and a refresh token.

Requires "*" permission on the organization and its children, and the "allowUserTokenManagement" flag to be enabled on the organization.

Authorizations
Header parameters
x-m2-organization-idstringRequired

The ID of an organization

Body

The request body for signing in with a custom token

tokenstringRequired

The custom token to sign in with

Responses
200
The response to generating a custom token
application/json
post
POST /api/accounts/token/signin/ HTTP/1.1
Host: your-organization-id.m2worlds.io
x-api-key: YOUR_API_KEY
x-m2-organization-id: text
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "token": "text"
}
200

The response to generating a custom token

{
  "idToken": "text",
  "refreshToken": "text",
  "expiresIn": "text",
  "isNewUser": true
}