All URIs are relative to https://api-APP_ID.sendbird.com
Method | HTTP request | Description |
---|---|---|
addRegistrationOrDeviceToken | POST /v3/users/{user_id}/push/{token_type} | Add a registration or device token |
choosePushNotificationContentTemplate | PUT /v3/users/{user_id}/push/template | Choose a push notification content template |
createUser | POST /v3/users | Create a user |
createUserToken | POST /v3/users/{user_id}/token | Create user token |
deleteUserById | DELETE /v3/users/{user_id} | Delete a user |
leaveMyGroupChannels | PUT /v3/users/{user_id}/my_group_channels/leave | Leave my group channels |
listMyGroupChannels | GET /v3/users/{user_id}/my_group_channels | List my group channels |
listRegistrationOrDeviceTokens | GET /v3/users/{user_id}/push/{token_type} | List registration or device tokens |
listUsers | GET /v3/users | List users |
markAllMessagesAsRead | PUT /v3/users/{user_id}/mark_as_read_all | Mark all messages as read |
registerAsOperatorToChannelsWithCustomChannelTypes | POST /v3/users/{user_id}/operating_channel_custom_types | Register as an operator to channels with custom channel types |
removeRegistrationOrDeviceToken | DELETE /v3/users/{user_id}/push | Remove a registration or device token - When unregistering all device tokens |
removeRegistrationOrDeviceTokenByToken | DELETE /v3/users/{user_id}/push/{token_type}/{token} | Remove a registration or device token - When unregistering a specific token |
removeRegistrationOrDeviceTokenFromOwnerByToken | DELETE /v3/push/device_tokens/{token_type}/{token} | Remove a registration or device token from an owner |
resetPushPreferences | DELETE /v3/users/{user_id}/push_preference | Reset push preferences |
updateChannelInvitationPreference | PUT /v3/users/{user_id}/channel_invitation_preference | Update channel invitation preference |
updateCountPreferenceOfChannelByUrl | PUT /v3/users/{user_id}/count_preference/{channel_url} | Update count preference of a channel |
updatePushPreferences | PUT /v3/users/{user_id}/push_preference | Update push preferences |
updatePushPreferencesForChannelByUrl | PUT /v3/users/{user_id}/push_preference/{channel_url} | Update push preferences for a channel |
updateUserById | PUT /v3/users/{user_id} | Update a user |
viewChannelInvitationPreference | GET /v3/users/{user_id}/channel_invitation_preference | View channel invitation preference |
viewCountPreferenceOfChannelByUrl | GET /v3/users/{user_id}/count_preference/{channel_url} | View count preference of a channel |
viewNumberOfChannelsByJoinStatus | GET /v3/users/{user_id}/group_channel_count | View number of channels by join status |
viewNumberOfChannelsWithUnreadMessages | GET /v3/users/{user_id}/unread_channel_count | View number of channels with unread messages |
viewNumberOfUnreadItems | GET /v3/users/{user_id}/unread_item_count | View number of unread items |
viewNumberOfUnreadMessages | GET /v3/users/{user_id}/unread_message_count | View number of unread messages |
viewPushPreferences | GET /v3/users/{user_id}/push_preference | View push preferences |
viewPushPreferencesForChannelByUrl | GET /v3/users/{user_id}/push_preference/{channel_url} | View push preferences for a channel |
viewUserById | GET /v3/users/{user_id} | View a user |
viewWhoOwnsRegistrationOrDeviceTokenByToken | GET /v3/push/device_tokens/{token_type}/{token} | View who owns a registration or device token |
AddRegistrationOrDeviceTokenResponse addRegistrationOrDeviceToken(apiToken, userId, tokenType, opts)
Add a registration or device token
Add a registration or device token > Note: A user can have up to 20 FCM registration tokens, 20 HMS device tokens, and 20 APNs device tokens each. The oldest token will be deleted before a new token is added for a user who already has 20 registration or device tokens. Only the 20 newest tokens will be maintained for users who already have more than 20 of each token type. To send notification requests to push notification services on behalf of your server, adds a specific user's FCM registration token, HMS device token, or APNs device token to Sendbird server. Depending on which push service you are using, you can pass one of two values in `token_type`: `gcm`, `huawei`, or `apns`. A FCM registration token and an APNs device token allow identification of each client app instance on each device, and are generated and registered by Android and iOS apps through the corresponding SDKs. Use this method if you need to register a token via your own server. > Note: For more information on the registration token and device token, visit the Google's FCM page, Huawei's Push kit and Apple's APNs page. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-add-a-registration-or-device-token ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let tokenType = "tokenType_example"; // String |
let opts = {
'addRegistrationOrDeviceTokenData': new SendbirdPlatformSdk.AddRegistrationOrDeviceTokenData() // AddRegistrationOrDeviceTokenData |
};
apiInstance.addRegistrationOrDeviceToken(apiToken, userId, tokenType, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
tokenType | String | ||
addRegistrationOrDeviceTokenData | AddRegistrationOrDeviceTokenData | [optional] |
AddRegistrationOrDeviceTokenResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
ChoosePushNotificationContentTemplateResponse choosePushNotificationContentTemplate(apiToken, userId, opts)
Choose a push notification content template
Choose a push notification content template Chooses a push notification content template of a user's own. The push notifications feature is only available for group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-choose-a-push-notification-content-template ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'body': {key: null} // Object |
};
apiInstance.choosePushNotificationContentTemplate(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
body | Object | [optional] |
ChoosePushNotificationContentTemplateResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
SendBirdUser createUser(apiToken, opts)
Create a user
Create a user Creates a new user in the application. A user is identified by its unique user ID, and additionally have a changeable nickname, profile image, and so on. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-create-a-user
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let opts = {
'createUserData': new SendbirdPlatformSdk.CreateUserData() // CreateUserData |
};
apiInstance.createUser(apiToken, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
createUserData | CreateUserData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
CreateUserTokenResponse createUserToken(apiToken, userId, opts)
Create user token
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'createUserTokenData': new SendbirdPlatformSdk.CreateUserTokenData() // CreateUserTokenData |
};
apiInstance.createUserToken(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
createUserTokenData | CreateUserTokenData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Object deleteUserById(apiToken, userId)
Delete a user
Delete a user Deletes a user. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-delete-a-user ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
apiInstance.deleteUserById(apiToken, userId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String |
Object
No authorization required
- Content-Type: Not defined
- Accept: application/json
Object leaveMyGroupChannels(apiToken, userId, opts)
Leave my group channels
Leave my group channels Makes a user leave all joined group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-leave-my-group-channels ---------------------------- `user_id` Type: string Description: Specifies the unique ID of the user to leave all joined group channels.
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'leaveMyGroupChannelsData': new SendbirdPlatformSdk.LeaveMyGroupChannelsData() // LeaveMyGroupChannelsData |
};
apiInstance.leaveMyGroupChannels(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
leaveMyGroupChannelsData | LeaveMyGroupChannelsData | [optional] |
Object
No authorization required
- Content-Type: application/json
- Accept: application/json
ListMyGroupChannelsResponse listMyGroupChannels(apiToken, userId, opts)
List my group channels
List my group channels Retrieves all group channels that the user has joined. You can create a request based on various query parameters. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-list-my-group-channels ---------------------------- `user_id` Type: string Description: Specifies the unique ID of the target user.
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'token': "token_example", // String |
'limit': 56, // Number |
'distinctMode': "distinctMode_example", // String |
'publicMode': "publicMode_example", // String |
'superMode': "superMode_example", // String |
'hiddenMode': "hiddenMode_example", // String |
'memberStateFilter': "memberStateFilter_example", // String |
'unreadFilter': "unreadFilter_example", // String |
'createdAfter': 56, // Number |
'createdBefore': 56, // Number |
'showEmpty': true, // Boolean |
'showFrozen': true, // Boolean |
'showMember': true, // Boolean |
'showDeliveryReceipt': true, // Boolean |
'showReadReceipt': true, // Boolean |
'order': "order_example", // String |
'metadataOrderKey': "metadataOrderKey_example", // String |
'customTypes': "customTypes_example", // String |
'customTypeStartswith': "customTypeStartswith_example", // String |
'channelUrls': "channelUrls_example", // String |
'name': "name_example", // String |
'nameContains': "nameContains_example", // String |
'nameStartswith': "nameStartswith_example", // String |
'membersExactlyIn': "membersExactlyIn_example", // String |
'membersIncludeIn': "membersIncludeIn_example", // String |
'queryType': "queryType_example", // String |
'membersNickname': "membersNickname_example", // String |
'membersNicknameContains': "membersNicknameContains_example", // String |
'searchQuery': "searchQuery_example", // String |
'searchFields': "searchFields_example", // String |
'metadataKey': "metadataKey_example", // String |
'metadataValues': "metadataValues_example", // String |
'metadataValueStartswith': "metadataValueStartswith_example", // String |
'metacounterKey': "metacounterKey_example", // String |
'metacounterValues': "metacounterValues_example", // String |
'metacounterValueGt': "metacounterValueGt_example", // String |
'metacounterValueGte': "metacounterValueGte_example", // String |
'metacounterValueLt': "metacounterValueLt_example", // String |
'metacounterValueLte': "metacounterValueLte_example", // String |
'customType': "customType_example" // String |
};
apiInstance.listMyGroupChannels(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
token | String | [optional] | |
limit | Number | [optional] | |
distinctMode | String | [optional] | |
publicMode | String | [optional] | |
superMode | String | [optional] | |
hiddenMode | String | [optional] | |
memberStateFilter | String | [optional] | |
unreadFilter | String | [optional] | |
createdAfter | Number | [optional] | |
createdBefore | Number | [optional] | |
showEmpty | Boolean | [optional] | |
showFrozen | Boolean | [optional] | |
showMember | Boolean | [optional] | |
showDeliveryReceipt | Boolean | [optional] | |
showReadReceipt | Boolean | [optional] | |
order | String | [optional] | |
metadataOrderKey | String | [optional] | |
customTypes | String | [optional] | |
customTypeStartswith | String | [optional] | |
channelUrls | String | [optional] | |
name | String | [optional] | |
nameContains | String | [optional] | |
nameStartswith | String | [optional] | |
membersExactlyIn | String | [optional] | |
membersIncludeIn | String | [optional] | |
queryType | String | [optional] | |
membersNickname | String | [optional] | |
membersNicknameContains | String | [optional] | |
searchQuery | String | [optional] | |
searchFields | String | [optional] | |
metadataKey | String | [optional] | |
metadataValues | String | [optional] | |
metadataValueStartswith | String | [optional] | |
metacounterKey | String | [optional] | |
metacounterValues | String | [optional] | |
metacounterValueGt | String | [optional] | |
metacounterValueGte | String | [optional] | |
metacounterValueLt | String | [optional] | |
metacounterValueLte | String | [optional] | |
customType | String | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
ListRegistrationOrDeviceTokensResponse listRegistrationOrDeviceTokens(apiToken, userId, tokenType)
List registration or device tokens
List registration or device tokens Retrieves a list of a specific user's FCM registration tokens, HMS device tokens, or APNs device tokens. You can specify either `gcm`, `huawei`, or `apns` in the `token_type` parameter, depending on which push notification service you are using. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-list-registration-or-device-tokens ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let tokenType = "tokenType_example"; // String |
apiInstance.listRegistrationOrDeviceTokens(apiToken, userId, tokenType).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
tokenType | String |
ListRegistrationOrDeviceTokensResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
ListUsersResponse listUsers(apiToken, opts)
List users
List users Retrieves a list of users in your application. You can query the list using various parameters. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-list-users ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let opts = {
'token': "token_example", // String |
'limit': 56, // Number |
'activeMode': "activeMode_example", // String |
'showBot': true, // Boolean |
'userIds': "userIds_example", // String |
'nickname': "nickname_example", // String |
'nicknameStartswith': "nicknameStartswith_example", // String |
'metadatakey': "metadatakey_example", // String |
'metadatavaluesIn': "metadatavaluesIn_example" // String |
};
apiInstance.listUsers(apiToken, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
token | String | [optional] | |
limit | Number | [optional] | |
activeMode | String | [optional] | |
showBot | Boolean | [optional] | |
userIds | String | [optional] | |
nickname | String | [optional] | |
nicknameStartswith | String | [optional] | |
metadatakey | String | [optional] | |
metadatavaluesIn | String | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Object markAllMessagesAsRead(apiToken, userId, opts)
Mark all messages as read
Mark all messages as read Marks all of a user's unread messages as read in the joined group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-mark-all-messages-as-read ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'markAllMessagesAsReadData': new SendbirdPlatformSdk.MarkAllMessagesAsReadData() // MarkAllMessagesAsReadData |
};
apiInstance.markAllMessagesAsRead(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
markAllMessagesAsReadData | MarkAllMessagesAsReadData | [optional] |
Object
No authorization required
- Content-Type: application/json
- Accept: application/json
Object registerAsOperatorToChannelsWithCustomChannelTypes(apiToken, userId, opts)
Register as an operator to channels with custom channel types
Register as an operator to channels with custom channel types Registers a user as an operator to channels with particular custom channel types. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-register-as-an-operator-to-channels-with-custom-channel-types ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'registerAsOperatorToChannelsWithCustomChannelTypesData': new SendbirdPlatformSdk.RegisterAsOperatorToChannelsWithCustomChannelTypesData() // RegisterAsOperatorToChannelsWithCustomChannelTypesData |
};
apiInstance.registerAsOperatorToChannelsWithCustomChannelTypes(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
registerAsOperatorToChannelsWithCustomChannelTypesData | RegisterAsOperatorToChannelsWithCustomChannelTypesData | [optional] |
Object
No authorization required
- Content-Type: application/json
- Accept: application/json
RemoveRegistrationOrDeviceTokenResponse removeRegistrationOrDeviceToken(apiToken, userId)
Remove a registration or device token - When unregistering all device tokens
Remove a registration or device token Removes a specific user's one or more FCM registration tokens, HMS device tokens, or APNs device tokens. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-remove-a-registration-or-device-token ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
apiInstance.removeRegistrationOrDeviceToken(apiToken, userId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String |
RemoveRegistrationOrDeviceTokenResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
RemoveRegistrationOrDeviceTokenByTokenResponse removeRegistrationOrDeviceTokenByToken(apiToken, userId, tokenType, token)
Remove a registration or device token - When unregistering a specific token
Remove a registration or device token Removes a specific user's one or more FCM registration tokens, HMS device tokens, or APNs device tokens. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-remove-a-registration-or-device-token ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let tokenType = "tokenType_example"; // String |
let token = "token_example"; // String |
apiInstance.removeRegistrationOrDeviceTokenByToken(apiToken, userId, tokenType, token).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
tokenType | String | ||
token | String |
RemoveRegistrationOrDeviceTokenByTokenResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
RemoveRegistrationOrDeviceTokenFromOwnerByTokenResponse removeRegistrationOrDeviceTokenFromOwnerByToken(apiToken, tokenType, token)
Remove a registration or device token from an owner
Remove a registration or device token from an owner Removes a registration or device token from a user who owns it. You can pass one of two values in `token_type`: `gcm`, `huawei`, or `apns`, depending on which push service you are using. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-remove-a-registration-or-device-token-from-an-owner ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let tokenType = "tokenType_example"; // String |
let token = "token_example"; // String |
apiInstance.removeRegistrationOrDeviceTokenFromOwnerByToken(apiToken, tokenType, token).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
tokenType | String | ||
token | String |
RemoveRegistrationOrDeviceTokenFromOwnerByTokenResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
ResetPushPreferencesResponse resetPushPreferences(apiToken, userId)
Reset push preferences
Reset push preferences Resets a user's push preferences. After performing this action, `do_not_disturb` and `snooze_enabled` are set to false. The values of the parameters associated with the time frame are all set to 0. `timezone` is reset to `UTC`. `push_sound` is reset to `default`. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-reset-push-preferences ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
apiInstance.resetPushPreferences(apiToken, userId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String |
No authorization required
- Content-Type: Not defined
- Accept: application/json
UpdateChannelInvitationPreferenceResponse updateChannelInvitationPreference(apiToken, userId, opts)
Update channel invitation preference
Update channel invitation preference Updates the channel invitation preference for a user's private group channels. > Note: Using the update default channel invitation preference action, you can update the value of channel invitation preference which is globally applied to all users within the application. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-update-channel-invitation-preference
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'updateChannelInvitationPreferenceData': new SendbirdPlatformSdk.UpdateChannelInvitationPreferenceData() // UpdateChannelInvitationPreferenceData |
};
apiInstance.updateChannelInvitationPreference(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
updateChannelInvitationPreferenceData | UpdateChannelInvitationPreferenceData | [optional] |
UpdateChannelInvitationPreferenceResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
UpdateCountPreferenceOfChannelByUrlResponse updateCountPreferenceOfChannelByUrl(apiToken, userId, channelUrl, opts)
Update count preference of a channel
Update count preference of a channel Updates count preference of a specific group channel of a user. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-update-count-preference-of-a-channel ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let channelUrl = "channelUrl_example"; // String |
let opts = {
'updateCountPreferenceOfChannelByUrlData': new SendbirdPlatformSdk.UpdateCountPreferenceOfChannelByUrlData() // UpdateCountPreferenceOfChannelByUrlData |
};
apiInstance.updateCountPreferenceOfChannelByUrl(apiToken, userId, channelUrl, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
channelUrl | String | ||
updateCountPreferenceOfChannelByUrlData | UpdateCountPreferenceOfChannelByUrlData | [optional] |
UpdateCountPreferenceOfChannelByUrlResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
UpdatePushPreferencesResponse updatePushPreferences(apiToken, userId, opts)
Update push preferences
Update push preferences Updates a user's push preferences. Through this action, you can set `do_not_disturb` for a user, and update the time frame in which the setting applies. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-update-push-preferences ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'updatePushPreferencesData': new SendbirdPlatformSdk.UpdatePushPreferencesData() // UpdatePushPreferencesData |
};
apiInstance.updatePushPreferences(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
updatePushPreferencesData | UpdatePushPreferencesData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
UpdatePushPreferencesForChannelByUrlResponse updatePushPreferencesForChannelByUrl(apiToken, userId, channelUrl, opts)
Update push preferences for a channel
Update push preferences for a channel Updates push preferences for a user's specific group channel. The push notifications feature is only available for group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-update-push-preferences-for-a-channel ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let channelUrl = "channelUrl_example"; // String |
let opts = {
'updatePushPreferencesForChannelByUrlData': new SendbirdPlatformSdk.UpdatePushPreferencesForChannelByUrlData() // UpdatePushPreferencesForChannelByUrlData |
};
apiInstance.updatePushPreferencesForChannelByUrl(apiToken, userId, channelUrl, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
channelUrl | String | ||
updatePushPreferencesForChannelByUrlData | UpdatePushPreferencesForChannelByUrlData | [optional] |
UpdatePushPreferencesForChannelByUrlResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
SendBirdUser updateUserById(apiToken, userId, opts)
Update a user
Update a user Updates information on a user. In addition to changing a user's nickname or profile image, you can issue a new access token for the user. The new access token replaces the previous one as the necessary token for authentication. You can also deactivate or reactivate a user. If the `leave_all_when_deactivated` is true (which it is by default), a user leaves all joined group channels when deactivated. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-update-a-user ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'updateUserByIdData': new SendbirdPlatformSdk.UpdateUserByIdData() // UpdateUserByIdData |
};
apiInstance.updateUserById(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
updateUserByIdData | UpdateUserByIdData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
ViewChannelInvitationPreferenceResponse viewChannelInvitationPreference(apiToken, userId)
View channel invitation preference
View channel invitation preference Retrieves channel invitation preference for a user's private group channels. > Note: Using the view default channel invitation preference action, you can retrieve the value of channel invitation preference which is globally applied to all users within the application. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-view-channel-invitation-preference
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
apiInstance.viewChannelInvitationPreference(apiToken, userId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String |
ViewChannelInvitationPreferenceResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
ViewCountPreferenceOfChannelByUrlResponse viewCountPreferenceOfChannelByUrl(apiToken, userId, channelUrl)
View count preference of a channel
View count preference of a channel Retrieves count preference of a specific group channel of a user. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-view-count-preference-of-a-channel ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let channelUrl = "channelUrl_example"; // String |
apiInstance.viewCountPreferenceOfChannelByUrl(apiToken, userId, channelUrl).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
channelUrl | String |
ViewCountPreferenceOfChannelByUrlResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
ViewNumberOfChannelsByJoinStatusResponse viewNumberOfChannelsByJoinStatus(apiToken, userId, opts)
View number of channels by join status
View number of channels by join status Retrieves the number of a user's group channels by their join status. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-view-number-of-channels-by-join-status ---------------------------- `user_id` Type: string Description: Specifies the unique ID of the user to retrieve the number.
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'state': "state_example" // String |
};
apiInstance.viewNumberOfChannelsByJoinStatus(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
state | String | [optional] |
ViewNumberOfChannelsByJoinStatusResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
ViewNumberOfChannelsWithUnreadMessagesResponse viewNumberOfChannelsWithUnreadMessages(apiToken, userId, opts)
View number of channels with unread messages
View number of channels with unread messages Retrieves the total number of a user's group channels with unread messages. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-view-number-of-channels-with-unread-messages ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'customTypes': ["null"], // [String] |
'superMode': "superMode_example" // String |
};
apiInstance.viewNumberOfChannelsWithUnreadMessages(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
customTypes | [String] | [optional] | |
superMode | String | [optional] |
ViewNumberOfChannelsWithUnreadMessagesResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
ViewNumberOfUnreadItemsResponse viewNumberOfUnreadItems(apiToken, userId, opts)
View number of unread items
View number of unread items Retrieves a set of total numbers of a user's unread messages, unread mentioned messages, or received invitations in either super or non-super group channels. This action is only available for the group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-view-number-of-unread-items ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'customType': "customType_example", // String |
'itemKeys': "itemKeys_example" // String |
};
apiInstance.viewNumberOfUnreadItems(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
customType | String | [optional] | |
itemKeys | String | [optional] |
ViewNumberOfUnreadItemsResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
ViewNumberOfUnreadMessagesResponse viewNumberOfUnreadMessages(apiToken, userId, opts)
View number of unread messages
View number of unread messages Retrieves the total number of a user's currently unread messages in the group channels. The unread counts feature is only available for the group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-view-number-of-unread-messages ---------------------------- `user_id` Type: string Description: Specifies the unique ID of the user to retrieve the number.
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'customTypes': "customTypes_example", // String |
'superMode': "superMode_example" // String |
};
apiInstance.viewNumberOfUnreadMessages(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
customTypes | String | [optional] | |
superMode | String | [optional] |
ViewNumberOfUnreadMessagesResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
ViewPushPreferencesResponse viewPushPreferences(apiToken, userId)
View push preferences
View push preferences Retrieves a user's push preferences about whether the user has set `do_not_disturb` to pause notifications for a certain period of time, and the time frame in which the user has applied the setting. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-view-push-preferences ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
apiInstance.viewPushPreferences(apiToken, userId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String |
No authorization required
- Content-Type: Not defined
- Accept: application/json
ViewPushPreferencesForChannelByUrlResponse viewPushPreferencesForChannelByUrl(apiToken, userId, channelUrl)
View push preferences for a channel
View push preferences for a channel Retrieves whether a user has turned on notification messages for a specific channel. The push notifications feature is only available for group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-view-push-preferences-for-a-channel ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let channelUrl = "channelUrl_example"; // String |
apiInstance.viewPushPreferencesForChannelByUrl(apiToken, userId, channelUrl).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
channelUrl | String |
ViewPushPreferencesForChannelByUrlResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
SendBirdUser viewUserById(apiToken, userId, opts)
View a user
View a user Retrieves information on a user. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-view-a-user ---------------------------- `user_id` Type: string Description: Specifies the unique ID of the user to retrieve.
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let userId = "userId_example"; // String |
let opts = {
'includeUnreadCount': true, // Boolean |
'customTypes': "customTypes_example", // String |
'superMode': "superMode_example" // String |
};
apiInstance.viewUserById(apiToken, userId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
userId | String | ||
includeUnreadCount | Boolean | [optional] | |
customTypes | String | [optional] | |
superMode | String | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[ViewWhoOwnsRegistrationOrDeviceTokenByTokenResponseInner] viewWhoOwnsRegistrationOrDeviceTokenByToken(apiToken, tokenType, token)
View who owns a registration or device token
View who owns a registration or device token Retrieves a user who owns a FCM registration token, HMS device token, or APNs device token. You can pass one of two values in `token_type`: `gcm`, `huawei`, or `apns`, depending on which push service you are using. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-view-who-owns-a-registration-or-device-token ----------------------------
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
let apiInstance = new SendbirdPlatformSdk.UserApi();
let apiToken = {{API_TOKEN}}; // String |
let tokenType = "tokenType_example"; // String |
let token = "token_example"; // String |
apiInstance.viewWhoOwnsRegistrationOrDeviceTokenByToken(apiToken, tokenType, token).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | ||
tokenType | String | ||
token | String |
[ViewWhoOwnsRegistrationOrDeviceTokenByTokenResponseInner]
No authorization required
- Content-Type: Not defined
- Accept: application/json