Agora Java API Reference for Android

Static Public Member Functions | Public Attributes | List of all members
io.agora.rtc2.Constants.RenewTokenErrorCode Enum Reference

Represents the error codes after calling `renewToken`. More...

## 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

Represents the error codes after calling `renewToken`.

Since
  4.6.0

## Member Data Documentation

## ◆ RENEW_TOKEN_SUCCESS

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

(0): Token updated successfully.

## ◆ RENEW_TOKEN_FAILURE

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

(1): Token update failed. It is recommended to generate a new Token and retry `renewToken`.

## ◆ RENEW_TOKEN_TOKEN_EXPIRED

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

(2): Token update failed because the provided Token has expired. It is recommended to 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): Token update failed because the provided Token is invalid. Common reasons include: the project has enabled App Certificate in the Agora Console but did not use a Token when joining the channel; the uid specified in `joinChannel` is inconsistent with the uid used when generating the Token; the channel name specified in `joinChannel` is inconsistent with the one used when generating the Token. It is recommended to check the Token generation process, generate a new Token, and retry `renewToken`.

## ◆ RENEW_TOKEN_INVALID_CHANNEL_NAME

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

(4): Token update failed because the channel name in the Token does not match the current channel. It is recommended to 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): Token update failed because the App ID in the Token does not match the current App ID. It is recommended to 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): Token update was canceled because a new request was initiated, and the previous request was canceled.