Unable to get tokens for devices
-
I’m stuck as to what to do. I have installed the GCM Key, .pem information, and have checked to make sure the two files are in the database. I have had one of our users login to the site and it doesn’t pick up the Android device. I also had a new person come onto the site with an iOS device and nothing.
When I go into the database nothing is registered or failing. When I go to look at the wrd_user information there is an activation key for the two that logged into the site.
Do I need to do something with this information to register the devices????
I don’t know exactly where I need to add this if I do.
To send a push notification to a device, we must know its token (or Device ID) which has to be provided by the app through this API. This API allows client device to register itself to Push Notifications for WordPress so that it can receive future notifications.
URL structure:
https://yourwordpresssite/wp-json/apnwp/register
Method: GET
Parameters:
device_token (string): token given by APNs or FCM identifying the device, often called device ID.
os_type (string): operating system. It must be ios or android (case sensitive).
user_email_id (string, optional): the user email address which is login from your mobile app.Examples:
Returns:
200: on success.Either user will be add / updated.
302: Invalid mandatory parameters passed.
500: Internal Server Error , on missing mandatory parameters, unknown operating system, or general failure.
- The topic ‘Unable to get tokens for devices’ is closed to new replies.