TIM

TIM

TIM is the namespace of the IM Web SDK and provides the static method create() for creating SDK instances, the event constant EVENT, and the type constant TYPES.

Methods

(static) create(options) → {Object}

Factory function of the IM Web SDK, which is used to create SDK instances
Before connecting, you need to create an IM application in the IM console and obtain the SDKAppID.
To quickly run through the IM demo, see Demo Quick Start.

Example
let options = {
  SDKAppID: 0 // Replace 0 with the SDKAppID of your IM application when connecting. Value type: Number
};
let tim = TIM.create(options); // The SDK instance is usually represented by tim
Parameters:
Name Type Description
options Object

Configuration

Properties
Name Type Attributes Default Description
SDKAppID Number

SDKAppID of your IM application

oversea Boolean <optional>
false

If your application needs to be used outside the Chinese mainland, set this property to true. Then the SDK will use a domain name outside the Chinese mainland to avoid interference.

Returns:

SDK instance

Type
Object