SDKsReact Native
Resolve a conversation ID
Generate a conversation ID from a chat target and session type.
Call getConversationIDBySessionType() to generate a conversation ID from a chat target and session type.
const conversationID = await OpenIMSDK.getConversationIDBySessionType({
sourceID: targetUserID,
sessionType: SessionType.Single,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sourceID | string | Yes | Pass the other user's ID for a one-to-one conversation or the group ID for a group conversation. |
sessionType | SessionType | Yes | Conversation type. Use SessionType.Single for one-to-one conversations and SessionType.Group for group conversations. |
Return result
The call returns the conversation ID as a string.
Was this page helpful?