The TopicDisallowed error comes from the Apple Push Notification service (APNs). Apple defines it as "Pushing to this topic is not allowed" — in other words, the topic (your app's bundle ID) is not covered by the credentials Pushwoosh is using to authenticate with APNs.
Typical causes
- The Bundle ID configured for the iOS platform in Pushwoosh does not exactly match the bundle identifier of the app that produced the device tokens.
- The APNs auth key (
.p8) or certificate in use is not enabled for the App ID / topic you are sending to (for example the key does not have the APNs service enabled, or belongs to another team). - You are sending to a sub-topic (e.g. a VoIP or Live Activity topic) that the configured credentials are not authorised for.
Not to be confused with
BadDeviceToken— the error you get when the build environment and the push gateway do not match (a Sandbox token sent to Production, or vice versa). Apple: "Verify that the request contains a valid token and that the token matches the environment."DeviceTokenNotForTopic— the device token does not match the specified topic.
How to fix
- In the Pushwoosh Control Panel, go to Settings → Configure platforms and open the iOS platform configuration.
- Verify the Bundle ID matches your app exactly, and that the Key ID and Team ID match the
.p8auth key you uploaded. - In the Apple Developer portal, confirm that the key has the APNs service enabled and has not been revoked.
- While you are there, also confirm the gateway is correct for your build: Production for App Store / TestFlight builds, Sandbox for builds run from Xcode. (A wrong gateway shows up as
BadDeviceToken.) - Re-run the configuration, then send a test push to verify.
Comments
0 comments
Please sign in to leave a comment.