logo
In-app Chat
SDK Error Codes
Powered Byspreading
On this page

Implement online authentication

You need a license to use the advanced features of the ZIM Audio SDK. We recommend that you obtain and verify the license through online authentication.

Online authentication refers to the method of accessing the ZIM server through the developer server, applying for authentication documents, and performing network verification.

After obtaining the license, the client needs to be authenticated by the ZIM Audio SDK to use its advanced features.

Warning

We recommend that you regularly pull and update online license data at the business layer to avoid issues such as local license cache expiration and authentication failure.

How it works

  1. The client server sends a request to the ZIM server by using the public gateway URL. The ZIM server returns the license to the client server.
  2. The client server sends the license to the client. (You need to implement this feature.)
  3. The client passes in the obtained license and initializes the ZIM Audio SDK.
  4. The advanced features of the ZIM Audio SDK are enabled for audio processing.

Usage steps

1. Request a license from the ZIM server

The client server builds a message body and sends a request to the ZIM server by using the public gateway URL. For more information about the message body, see the Request method and endpoint, Request parameters, and Sample request sections in the Server APIs topic.

2. The ZIM server returns the license

For more information about the returned message, see the Response parameters and Sample response sections in the Server APIs topic.

3. Pass in the license and create an object.

Pass in the obtained license to the ZIM Audio SDK to activate functional modules.

You need to obtain the license content from the License field in the Data field and call the initWithLicense method to pass in the license and initialize the ZIM Audio SDK.

Untitled
// Pass in the license and initialize the ZIM Audio SDK.
[[ZIMAudio sharedInstance] initWithLicense:@""];
1
Copied!

Previous

Send and receive audio messages

Next

AGC