Package io.agora.rtc2

Enum Class Constants.RenewTokenErrorCode

java.lang.Object
java.lang.Enum<Constants.RenewTokenErrorCode>
io.agora.rtc2.Constants.RenewTokenErrorCode
All Implemented Interfaces:
Serializable, Comparable<Constants.RenewTokenErrorCode>, Constable
Enclosing class:
Constants

public static enum Constants.RenewTokenErrorCode extends Enum<Constants.RenewTokenErrorCode>
Error codes for renewing a token. These error codes indicate the result of calling renewToken.
Since:
4.6.0
  • Enum Constant Details

    • RENEW_TOKEN_SUCCESS

      public static final Constants.RenewTokenErrorCode RENEW_TOKEN_SUCCESS
      0: The token is renewed successfully.
    • RENEW_TOKEN_FAILURE

      public static final Constants.RenewTokenErrorCode RENEW_TOKEN_FAILURE
      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

      public static final Constants.RenewTokenErrorCode RENEW_TOKEN_TOKEN_EXPIRED
      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

      public static final Constants.RenewTokenErrorCode RENEW_TOKEN_INVALID_TOKEN
      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

      public static final Constants.RenewTokenErrorCode RENEW_TOKEN_INVALID_CHANNEL_NAME
      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

      public static final Constants.RenewTokenErrorCode RENEW_TOKEN_INCONSISTENT_APPID
      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

      public static final Constants.RenewTokenErrorCode RENEW_TOKEN_CANCELED_BY_NEW_REQUEST
      6: The token renewal was canceled because a new request was made, and the previous one was canceled.
  • Method Details

    • values

      public static Constants.RenewTokenErrorCode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Constants.RenewTokenErrorCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public static int getValue(Constants.RenewTokenErrorCode code)
    • fromInt

      public static Constants.RenewTokenErrorCode fromInt(int v)