Agora Java API Reference for Android
Static Public Member Functions | Public Attributes | List of all members
io.agora.rtc2.Constants.RenewTokenErrorCode Enum Reference

Static Public Member Functions

static int getValue (RenewTokenErrorCode code)
 
static RenewTokenErrorCode fromInt (int v)
 

Public Attributes

 RENEW_TOKEN_SUCCESS =(0)
 
 RENEW_TOKEN_FAILURE =(1)
 
 RENEW_TOKEN_TOKEN_EXPIRED =(2)
 
 RENEW_TOKEN_INVALID_TOKEN =(3)
 
 RENEW_TOKEN_INVALID_CHANNEL_NAME =(4)
 
 RENEW_TOKEN_INCONSISTENT_APPID =(5)
 
 RENEW_TOKEN_CANCELED_BY_NEW_REQUEST =(6)
 

Detailed Description

Error codes for renewing a token.

These error codes indicate the result of calling renewToken.

Since
4.6.0

Member Data Documentation

◆ RENEW_TOKEN_SUCCESS

io.agora.rtc2.Constants.RenewTokenErrorCode.RENEW_TOKEN_SUCCESS =(0)

0: The token is renewed successfully.

◆ RENEW_TOKEN_FAILURE

io.agora.rtc2.Constants.RenewTokenErrorCode.RENEW_TOKEN_FAILURE =(1)

1: The token renewal failed because of some unknown server error. It is recommended that the user check the parameters passed in when generating the token and generate a new token and retry renewToken.

◆ RENEW_TOKEN_TOKEN_EXPIRED

io.agora.rtc2.Constants.RenewTokenErrorCode.RENEW_TOKEN_TOKEN_EXPIRED =(2)

2: The token renewal failed because the provided token has expired. It is recommended that the user generate a new token with a longer expiration time and retry renewToken.

◆ RENEW_TOKEN_INVALID_TOKEN

io.agora.rtc2.Constants.RenewTokenErrorCode.RENEW_TOKEN_INVALID_TOKEN =(3)

3: The token renewal failed because the token is not valid. Typical reasons include:

  • The App Certificate for the project is enabled in Agora Console, but you do not use a token when joining the channel. If you enable the App Certificate, you must use a token to join the channel.
  • The uid that you specify in the joinChannel method is different from the uid that you pass for generating the token.
  • The channel name that you specify in the joinChannel method is different from the channel name that you pass for generating the token.

◆ RENEW_TOKEN_INVALID_CHANNEL_NAME

io.agora.rtc2.Constants.RenewTokenErrorCode.RENEW_TOKEN_INVALID_CHANNEL_NAME =(4)

4: The token renewal failed because the channel name is invalid. It is recommended that the user check the channel name, generate a new token, and retry renewToken.

◆ RENEW_TOKEN_INCONSISTENT_APPID

io.agora.rtc2.Constants.RenewTokenErrorCode.RENEW_TOKEN_INCONSISTENT_APPID =(5)

5: The token renewal failed because the app ID in the token does not match the current app ID. It is recommended that the user check the app ID, generate a new token, and retry renewToken.

◆ RENEW_TOKEN_CANCELED_BY_NEW_REQUEST

io.agora.rtc2.Constants.RenewTokenErrorCode.RENEW_TOKEN_CANCELED_BY_NEW_REQUEST =(6)

6: The token renewal was canceled because a new request was made, and the previous one was canceled.