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.
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
- 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.
- The client server sends the license to the client. (You need to implement this feature.)
- The client passes in the obtained license and initializes the ZIM Audio SDK.
- 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.
// Pass in the license and initialize the ZIM Audio SDK.
[[ZIMAudio sharedInstance] initWithLicense:@""];