Skip to main content
Register FCM Token

Overview

Registers a Firebase Cloud Messaging (FCM) token for push notifications on mobile devices. This endpoint should be called when:
  • User logs in on a mobile device
  • App starts and user is already logged in
  • FCM token is refreshed

Use Cases

  • Mobile App Login: Register device for push notifications after successful login
  • App Startup: Re-register token when app starts with authenticated user
  • Token Refresh: Update token if FCM token changes (rare but possible)

Important Notes

Each device needs a unique deviceId. Use a persistent identifier like Device.deviceId in React Native/Expo.
Users can have multiple registered devices (iPhone, iPad, Android tablet). All devices will receive push notifications.

Example Usage

React Native/Expo

See Also

Body

application/json
token
string
required

Firebase Cloud Messaging token from the device

Example:

"ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]"

deviceId
string
required

Unique identifier for the device

Example:

"device_abc123"

platform
enum<string>
required

Platform of the device

Available options:
ios,
android,
web
Example:

"ios"

Response

FCM token registered successfully

success
boolean
required

Whether the operation was successful

Example:

true

message
string
required

Success message

Example:

"FCM token registered successfully"