Tools icon indicating copy to clipboard operation
Tools copied to clipboard

110 token is invalid

Open aakash-patel-dev opened this issue 4 years ago • 7 comments

I'm getting "110 token is invalid" but when I created from agora console (agora temp token is working) and when I created from source code example of PHP.

-appid -app certificate -channelName -uid ===>I'm using 'Token with int uid: '

how to implement join channel from android side

aakash-patel-dev avatar May 26 '21 16:05 aakash-patel-dev

Can you give an example of your token?

yoreland avatar May 27 '21 02:05 yoreland

Thanks its working fine now

aakash-patel-dev avatar May 27 '21 05:05 aakash-patel-dev

I am getting a 110 Invalid token error in My android app while generating tokens.

private fun generateRTCToken(): String{ val token = RtcTokenBuilder() val timestamp = (System.currentTimeMillis() / 1000 + 18000).toInt() val result = token.buildTokenWithUserAccount( getString(R.string.agora_app_id), getString(R.string.agora_certificate), channelName, "[email protected]", RtcTokenBuilder.Role.Role_Publisher, timestamp ) Log.e(MainActivity.TAG, "Agora Token Generated $result") return result }

App Id: de9e6e9c2e87409e849ebd109a0e9eb0

Generated Token : 006de9e6e9c2e87409e849ebd109a0e9eb0IACFUIehc2XIGs2h9rT5HSeV5F3IFr0iXt+JkoL9ZdZej3b05vt6SoaNIgCpqK3HmrQIYQQAAQBqqQdhAgBqqQdhAwBqqQdhBABqqQdh

error message: onError code 110 message The Token is invalid

Nithinjith avatar Aug 02 '21 03:08 Nithinjith

Hello, @Nithinjith the token is working fine but the problem is when you are creating join channel you need to generate token for different user id and they can join within same channel name but your generated tokens are different.

aakash-patel-dev avatar Aug 02 '21 03:08 aakash-patel-dev

You can check from this following link and also you need to pass your generated tokens with their user id https://webdemo.agora.io/agora-web-showcase/examples/Agora-Web-Tutorial-1to1-Web/

aakash-patel-dev avatar Aug 02 '21 03:08 aakash-patel-dev

As far as I know, I am getting a NO_AUTHORIZED error from the given portal console. Is there any API available to authenticate my domain users?

Nithinjith avatar Aug 03 '21 06:08 Nithinjith

@Nithinjith i think you need to generate this tokens from your server and agora can't provide any API for authentication. This tokens are working fine for me

aakash-patel-dev avatar Aug 03 '21 11:08 aakash-patel-dev