Hello,
I am trying to run the project on iOS and I face a token issue, maybe because of my misunderstanding.
I have set up correctly my AgoraIO account and created my test project. I have also set up the LeanCloud account correctly.
So the app starts normally and I wish to create a room by tapping the related button in the CreateRoom view. At this point, I always get the error "Invalid token" when joining the channel/room. LeanCloud table entries are created successfully (and new rooms appear in the Main view of the app). App Certificate is enabled on my AgoraIO project. So that I believe I need to set the Token in BuildConfig along with my AppId.
My first question is : Based on my AgoraIO project, which one should I use in the OnlineKTV project when I join the channel ? BuildConfig.Token
or BuildConfig.RtmToken
?
In the previous screenshot, in addition to the AppID, there are :
Token : under "Status", which is a static one : I imagine this token is the RTM token, can you confirm ?
RTC token : which is a valid for 24h, and generated and linked to a specific channel name/id.
My second question is : Can you confirm that I don't need this RTC token ?
As we can create many channels with different name/id in the application, I believe that I don't have to use it.
Finally, I updated the call to joinChannel()
in RtcServer
to use BuildConfig.Token
(nil
in source code), updated with the "general" Token (not the RTC token). Is it correct then ?
Actually I tried each scenario using one or the other, an I always face the error "Invalid Token" error. Can you help me to understand how these tokens are used ?
I don't know what to try now, I wish to get some help in order to evaluate this AgoraIO product.
Thank you!