If you are encountering 401 Unauthorized errors when your OutSystems application tries to register an iOS device with Pushwoosh, the cause is a missing Device API Token — recent iOS SDKs require this token to authenticate registration calls.
Follow these steps to resolve the issue:
- Update the plugin: the build-time token preference requires Pushwoosh Plugin component version 4.7.0 or newer. Install the newer version from the OutSystems Forge, refresh the dependency in Manage Dependencies, and generate a new native build.
- Get your Device API Token: in the Pushwoosh Control Panel, go to Settings → API Access and copy a token of type Device API. Do not use a Server API token.
-
Provide the token to the app, using either option:
-
At build time (recommended). Add the token as a
PW_API_TOKENpreference, next toPW_APPID, in the Extensibility Configurations property of your application:
Preference names are case-sensitive.{ "preferences": { "global": [ { "name": "PW_APPID", "value": "XXXXX-XXXXX" }, { "name": "PW_API_TOKEN", "value": "your Device API token" } ] } } -
At runtime. Call the
SetApiTokenclient action with the token beforeRegisterDevice.
-
At build time (recommended). Add the token as a
- Verify credentials: double-check the Pushwoosh Application Code and the Device API Token for the specific project.
For details, see the OutSystems integration guide and the client actions reference.
Comments
0 comments
Please sign in to leave a comment.