Search code examples
androidpubnub

PUBNUB integration in android -forbbiden exception


Hi I am trying to integrate pubnub- a real time chatting client available in 70 + languages.

i registered my self with the developer console and got PUbLISHER_KEY and SUBSCRIBER_KEY.when ever i am trying to publish message by passing publish key and subscribe key i am getting forbbiden exception.

if i am passing "demo" and "demo" as those keys i am able establish connection to pubnub.

can any one help me how to resolve this issue . a sample app in android is more help full.


Solution

  • The forbidden exception is happening since you have PubNub Access Manager (PAM) enabled. Once enabled, all access to PubNub on your pub/sub keys is blocked unless access has been granted.

    If you want your keys to work right away, simple log on to your admin console and disable Access Manager on your account until you are ready to implement it.

    For more information on Access Manager, see the following links.

    Grant Access: http://www.pubnub.com/docs/javascript/api/reference.html#grant

    Read more about PAM: http://www.pubnub.com/how-it-works/access-manager/

    Security with PAM: http://www.pubnub.com/docs/javascript/overview/security.html