When using PubNub APIs, you may encounter a 403 Forbidden error. This typically occurs due to permission issues, invalid tokens, or misconfigurations.
Access Manager allows you to define permissions for various resources. If the permissions for a specific resource (such as a channel or user) are not granted, any attempt to access that resource will result in a 403 error. Verify that the necessary permissions are granted for the resources you're trying to access.
3. Revoked Permissions
If permissions have been revoked for a resource, any subsequent access attempts will result in a 403 error.
4. Disabled Features
Certain PubNub APIs require specific features to be enabled in your admin account. If these features are disabled, any attempt to use their respective APIs will result in a 403 error:
- Channel Groups APIs require Stream Controller to be enabled.
- History APIs require the Message Persistence feature to be enabled.
- Push APIs require the Mobile Push Notification feature to be enabled.
- App Context APIs require the App Context feature to be enabled.
To learn more, visit our official documentation pages: