If you work on the custom application, Firebase settings should be updated in the backoffice.
Register mobile device
To send push notifications, we need to know the information about the mobile device and associated Firebase token. Opigno Enterprise API provides an endpoint to register mobile devices. If device already exists (there is a match between a user context UUID and device UUID), an associated token will be updated. To register device, theregisterMobileDevice mutation should be executed right after the login.
Mutation has one required argument deviceData that represents the information about the mobile device that is being registered:
If the mutation executed without any errors, a boolean value will be returned as a response indicating the success status:
Unregister mobile device
To prevent push notifications from being created when a user is logged out from the application, should be executed theunregisterMobileDevice mutation. It has one argument - firebaseToken.
If the mutation executed without any errors, a boolean value will be returned as a response indicating the success status:
Update Firebase token
Default lifetime of the Firebase token is 1 hour. Once this time is over, push notifications will not be delivered to the related device. To prevent such cases, the token should be updated. To do this,updateFirebaseToken mutation should be executed.
If the mutation executed without any errors, a boolean value will be returned as a response indicating the success status: