ajb413 / chat-engine-webrtc

ChatEngine Plugin for WebRTC Video Chat in a Chat App. Demo:
https://ajb413.github.io/chat-engine-webrtc/example/
MIT License
12 stars 4 forks source link

There was a problem publishing over the pubnub network. #5

Closed AdilShoukatConstant closed 5 years ago

AdilShoukatConstant commented 5 years ago

Hi,

I am getting following issue when call to user function called through code.

Code: ` ChatEngine.me.webRTC.callUser(userToCall, { myStream: localStream });

**Error:** category: "PNAccessDeniedCategory" error: true errorData: Error: Forbidden at l. (https://cdn.jsdelivr.net/npm/chat-engine@0.9.18/dist/chat-engine.js:3774:12342) at l.r.emit (https://cdn.jsdelivr.net/npm/chat-engine@0.9.18/dist/chat-engine.js:3774:19528) at XMLHttpRequest.t.onreadystatechange (https://cdn.jsdelivr.net/npm/chat-engine@0.9.18/dist/chat-engine.js:3774:16657) operation: "PNPublishOperation" statusCode: 403


chat-engine.js:2364 Objectcategory: "PNAccessDeniedCategory"error: trueerrorData: Error: Forbidden at l. (https://cdn.jsdelivr.net/npm/chat-engine@0.9.18/dist/chat-engine.js:3774:12342) at l.r.emit (https://cdn.jsdelivr.net/npm/chat-engine@0.9.18/dist/chat-engine.js:3774:19528) at XMLHttpRequest.t.onreadystatechange (https://cdn.jsdelivr.net/npm/chat-engine@0.9.18/dist/chat-engine.js:3774:16657)operation: "PNPublishOperation"statusCode: 403proto: Object ChatEngine.throwError @ chat-engine.js:2364 `

Can you please let me know that what i am missing? I think, it is something related to permissions.

ajb413 commented 5 years ago

PubNub Access Manager is blocking your client from using PubNub channels. Have you created a ChatEngine application on your PubNub account and used the API keys for the ChatEngine app in your js code? If you haven't already, try following the tutorial here https://www.pubnub.com/blog/webrtc-video-chat-engine-plugin-video-calling-chat/?devrel_gh=chat-engine-webrtc