Authentication

Authenticate with Privy token

post

Verify a Privy token and return the user's info including roles and a Meshmap session token. Creates a new user if one does not exist.

Body
tokenstringRequired

Privy authentication token

Responses
chevron-right
200

Authentication successful

application/json
meshmapSessionTokenstringRequired

JWT session token for authenticating with Meshmap APIs

post
/auth/privy

Get current user profile

get

Get the profile information for the authenticated user

Authorizations
AuthorizationstringRequired

Session token in Bearer format: Bearer

Responses
chevron-right
200

User profile retrieved successfully

application/json
idstringRequired

Unique user identifier

emailstring · nullableOptional

User email address

firstNamestring · nullableOptional

User first name

lastNamestring · nullableOptional

User last name

phoneNumberstring · nullableOptional

User phone number

usernamestring · nullableOptional

User username

createdAtstring · date-timeRequired

User creation timestamp

imageUrlstring · nullableOptional

User profile image URL

get
/user

Update current user profile

patch

Update the username for the authenticated user

Authorizations
AuthorizationstringRequired

Session token in Bearer format: Bearer

Body
usernamestring · min: 1Required

New username for the user

Responses
chevron-right
200

User profile updated successfully

application/json
idstringRequired

Unique user identifier

emailstring · nullableOptional

User email address

firstNamestring · nullableOptional

User first name

lastNamestring · nullableOptional

User last name

phoneNumberstring · nullableOptional

User phone number

usernamestring · nullableOptional

User username

createdAtstring · date-timeRequired

User creation timestamp

imageUrlstring · nullableOptional

User profile image URL

patch
/user

Remove user profile image

delete

Delete the profile image for the authenticated user

Authorizations
AuthorizationstringRequired

Session token in Bearer format: Bearer

Responses
chevron-right
200

Profile image removed successfully

application/json
successbooleanOptional
delete
/user/profile-image

Upload user profile image

patch

Upload or replace the profile image for the authenticated user

Authorizations
AuthorizationstringRequired

Session token in Bearer format: Bearer

Body
imagestring · binaryRequired

Image file to upload

Responses
chevron-right
200

Profile image uploaded successfully

application/json
idstringRequired

Unique user identifier

emailstring · nullableOptional

User email address

firstNamestring · nullableOptional

User first name

lastNamestring · nullableOptional

User last name

phoneNumberstring · nullableOptional

User phone number

usernamestring · nullableOptional

User username

createdAtstring · date-timeRequired

User creation timestamp

imageUrlstring · nullableOptional

User profile image URL

patch
/user/profile-image

Generate authentication game code

post

Generate a new 6-digit authentication code from headset side

Authorizations
x-app-api-keystringRequired

App API key in format:

Body
playerIdstring · nullableRequired

Player ID to associate with the code. Used to link the player to the code. Optional.

Responses
chevron-right
200

Code generated successfully

application/json
codestringRequired

Generated authentication code

Pattern: ^[0-9]{6}$
playerIdstring · nullableOptional

Player ID associated with the code (if provided)

expiryTimestring · date-timeRequired

Code expiration timestamp

post
/code

Validate authentication code

post

Validate an authentication code and optionally return a session token

Authorizations
x-app-api-keystringRequired

App API key in format:

Body
codestringRequired

Authentication code

Pattern: ^[0-9]{6}$
Responses
chevron-right
200

Game code validation result

application/json
statusstring · enumRequired

Code validation status

Possible values:
sessionTokenstringOptional

JWT session token (only present when status is VALID and user is authenticated)

expiryTimestring · date-timeOptional

Code expiry time (only present when status is VALID)

errorstringOptional

Error message (only present when status is not VALID)

post
/auth/code

Last updated