Documentation
¶
Index ¶
- func BuildAppToken(appId string, appCertificate string, expire uint32) (string, error)
- func BuildRoomUserToken(appId string, appCertificate string, roomUuid string, userUuid string, ...) (string, error)
- func BuildUserToken(appId string, appCertificate string, userUuid string, expire uint32) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAppToken ¶
BuildAppToken
@param appId: The App ID issued to you by Agora. Apply for a new App ID from Agora Dashboard if it is missing from your kit. See Get an App ID. @param appCertificate: Certificate of the application that you registered in the Agora Dashboard. See Get an App Certificate. @param expire: represented by the number of seconds elapsed since now. If, for example, you want to access the Agora Service within 10 minutes after the token is generated, set expire as 600(seconds).
return The App token.
func BuildRoomUserToken ¶
func BuildRoomUserToken(appId string, appCertificate string, roomUuid string, userUuid string, role int16, expire uint32) (string, error)
BuildRoomUserToken
@param appId: The App ID issued to you by Agora. Apply for a new App ID from Agora Dashboard if it is missing from your kit. See Get an App ID. @param appCertificate: Certificate of the application that you registered in the Agora Dashboard. See Get an App Certificate. @param roomUuid: The room's id, must be unique. @param userUuid: The user's id, must be unique. @param role: The user's role. @param expire: represented by the number of seconds elapsed since now. If, for example, you want to access the Agora Service within 10 minutes after the token is generated, set expire as 600(seconds).
return The Room User token.
func BuildUserToken ¶
func BuildUserToken(appId string, appCertificate string, userUuid string, expire uint32) (string, error)
BuildUserToken
@param appId: The App ID issued to you by Agora. Apply for a new App ID from Agora Dashboard if it is missing from your kit. See Get an App ID. @param appCertificate: Certificate of the application that you registered in the Agora Dashboard. See Get an App Certificate. @param userUuid: The user's id, must be unique. @param expire: represented by the number of seconds elapsed since now. If, for example, you want to access the Agora Service within 10 minutes after the token is generated, set expire as 600(seconds).
return The User token.
Types ¶
This section is empty.