2017-09-04 60 views
0
[Error: Failed to createSession. Error: An authentication error 
occurred: (403) {"code":-1,"message":"Expired token"}] 

我能我的本地服務器上創建會話就好了,但是當 我把它在生產中具有HTTPS出現錯誤。Tokbox未能創建會話

我正在使用tokbox與流星框架。和包裝功能的方法中:

const opentok = new OpenTok(Meteor.settings.public.opentok.apiKey, Meteor.settings.public.opentok.apiSecret); 

    let createSessionSync = Meteor.wrapAsync(opentok.createSession, opentok); 
+0

令牌錯誤與有沒有你檢查你是否在生產環境中獲得了正確的'apiKey'和'apiSecret'? – bennygenel

+0

@bennygenel是的,它的apikey和apiSecret是正確的 – Potato

+0

這看起來像一個tokbox錯誤。如果(錯誤)返回console.log(err); //保存sessionId console.log('session',session。)會添加一個回調函數到createSession'opentok.createSession(函數(err,session){ } sessionId); });'。也許錯誤信息會幫助解決問題。 – bennygenel

回答

0

重啓服務器似乎工作,但我只是不知道爲什麼創建會話,因爲我還沒有使用令牌尚未