This is what you have to check if you are receiving the following error response to a /registerDevice API request:
| Response: {"status_code":210,"status_message":"Application not found","response":null}
1. Check the application parameter. The /registerDevice request must contain "application":"your_application_code", and the code must exactly match the Application Code of your project in the Pushwoosh Control Panel (format XXXXX-XXXXX).
| Url: https://api.pushwoosh.com/json/1.3/registerDevice
| Payload: {"request":{"application":"XXXXX-XXXXX","auth":"YOUR_DEVICE_API_TOKEN","hwid":"...","push_token":"...","device_type":3,...}}
| Response: {"status_code":200,"status_message":"OK","response":null}
2. Check the Device API Token. Current SDK versions also require a Device API Token that is granted access to this application. A missing or wrong token results in a 401 Unauthorized rather than 210, but both are configuration errors worth checking together.
3. Where to put the Application Code in your app. Copy the Application Code from the Pushwoosh Control Panel and specify it:
- iOS — in Info.plist as the value of the Pushwoosh_APPID string key (and the Device API Token as Pushwoosh_API_TOKEN);
-
Android — in res/values/strings.xml as the pushwoosh_app_id string (and the Device API Token as pushwoosh_api_token). Note: the legacy
com.pushwoosh.appidmanifest meta-data key is no longer used by current SDK versions.
Full integration steps:
Comments
0 comments
Please sign in to leave a comment.