Hello!
To ensure that a user appears in the list of subscribers you should call the Register API in your app. Then, since you’re using PhoneGap, don’t forget to check “In the Android notification payload add the message field” in the Push Notifications for WordPress settings page.
Hope it helps!
Thread Starter
JayTh
(@jayth)
Hi,
Can you please tell me about token means exact which string.
Thanks.
The token is the Device ID, i.e. a unique identifier of the device. It is an opaque alphanumeric string. For more details I suggest you refer to the documentation of the platform on which you are developing.
Hope it helps!
Hi,
I am creating an app in phonegap with Push Notifications for WordPress (Lite) plugin.
To register my api with this I am hitting url like this :
http://www.mysite.com/pnfw/register/?token=new_device_id&os=Android
In response it give 401 error.
Is the url structure am hitting to register is correct or not! if not then what should be the structure for it?
Thanks.
I suggest you to refer to the official documentation of the Register API. As you can see, the 401 means “Unauthorized” and it occurs when “OAuth is enabled but the signature is invalid.” To solve the problem you should disable OAuth or (recommended) implement it correctly.
Hope it helps!
Hello! Not having received any response we’ll assume that the problem is resolved and close this thread. Kind regards!