User

View push preferences

Changed on

View push preferences

You can retrieves a user's notifications preferences. A push notification is a message that is immediately delivered to a user's device when the device is either idle or running the client app in the background.

Note: Push notifications are only available for group channels.

https://sendbird.com/docs/chat/platform-api/v3/user/configuring-notification-preferences/get-push-notification-preferences#1-get-push-notification-preferences

get/v3/users/{user_id}/push_preference

Request

  • Base URL
    https://api-APP_ID.sendbird.com
  • Auth
    none declared

Path parameters

user_idstring required

(Required)

Headers

api-tokenstring
Example:{{API_TOKEN}}

Response

Successful response

block_push_from_botsboolean
do_not_disturbboolean
enable_push_for_repliesboolean
end_hourinteger
end_mininteger
push_blocked_bot_idsstring[]
push_soundstring
push_trigger_option'all' | 'mention_only' | 'off'
snooze_enabledboolean
snooze_end_tsinteger
snooze_start_tsinteger
start_hourinteger
start_mininteger
timezonestring

Example response

{
  "timezone": "timezone",
  "push_blocked_bot_ids": [
    "push_blocked_bot_ids",
    "push_blocked_bot_ids"
  ],
  "do_not_disturb": true,
  "enable_push_for_replies": true,
  "start_min": 2,
  "snooze_end_ts": 1,
  "dnd_schedules": [
    {
      "time_windows": [
        {
          "end_min": 2,
          "start_hour": 7,
          "end_hour": 3,
          "start_min": 9
        },
        {
          "end_min": 2,
          "start_hour": 7,
          "end_hour": 3,
          "start_min": 9
        }
      ],
      "day_of_week": "monday"
    },
    {
      "time_windows": [
        {
          "end_min": 2,
          "start_hour": 7,
          "end_hour": 3,
          "start_min": 9
        },
        {
          "end_min": 2,
          "start_hour": 7,
          "end_hour": 3,
          "start_min": 9
        }
      ],
      "day_of_week": "monday"
    }
  ],
  "snooze_enabled": true,
  "end_min": 6,
  "push_sound": "push_sound",
  "start_hour": 5,
  "snooze_start_ts": 5,
  "push_trigger_option": null,
  "end_hour": 0,
  "block_push_from_bots": true
}

Changes