Closed fishball82 closed 3 years ago
AgoraErrorCodeInvalidToken(110) still refer to invalid token issue. It seems that it might due to primary certificate enabled then cause temporary token doesn't work on your project. Can you maybe recreate a new project and use only temporary token and try again?
@yoreland Thanks for your quick response.
I have tried to create another project without enabling the primary certificate but I cannot obtain the temp token for audio/video call from the dashboard as it told me to enable App Certificate first and disable Appid only mode
I also try to create another project without APPID mode and with a primary certificate by default. There I can obtain the temp token for audio/video call. After building I'm able to run the project but fail to get into the Dial View at all with the error message: "RTM login failed". Also in the dashboard, it states that Temp Token for audio/video call does not support RTM. For this reason, I have to follow the previous project to create rtm token first and then the rtc token with AgoraDynamicKey library but still encounter the 110 error when the video call gets connected.
@fishball82 Sorry for confusing. Yes, specific for RTM, temporary token won't work. It is for RTC use only. So in your case, there are two options:
Btw, if it is for just demo. You could also run your project without token at all.. Just make sure you know this :)
@yoreland Thanks for your head up. Successfully run the app with Option 1. I don't aware that I can simply add the appID as RTM token and pass nil as RTC token.
Want to clarify a bit on Option 2 as I'm considering using Agora in my app for production. I use the app id, primary certificate, and token generator to obtain the RTM and RTC tokens for the user respectively, but error 110 still arises. I have manually placed the RTC token in KeyCenter and RTM token in the MainViewController. Do I have any misconfiguration leading to this error?
which token generator you are using?
@yoreland Simply using the code example in https://github.com/AgoraIO/Tools/tree/master/DynamicKey/AgoraDynamicKey/nodejs to generate the RTC token. For RTM token, I have obtained the RTM token with RtmTokenBuilder.buildToken() method
As per RTM token error code is another one (5). 110 refer to RTC token error.. Might need to pay attention for channel name you use for generate token. The token could be used for join this specific channel only. When you go production, for each time join channel, need to generate a token.
Thanks for the quick response. After reading through the documentation, I finally able to solve the issue with token generator. Appreciate your help!
Hi,
I tried with the example but I fail to login with the temporary token from the dashboard but failed to login. After reading the document it seems that I need to generate another rtm token, so I enabled the Primary Certificate and did so with the AgoraDynamicKey repo.
Whilst I'm able to invoke Callkit between 2 devices after logging in, however, I receive an error code 110 when entering into the Video Call screen. I tried to replace the token in Keycenter.swift with the temporary token and rtc tokens generated with AgoraDynamicKey corresponding to uid, but all of the attempts failed to establish a video call. Please advise.