推送通知设备

推送通知设备是Zendesk Support SDK用于发送推送通知的移动设备标识符。亚博

批量注销推送通知设备

  • POST / api / v2 / push_notification_devices / destroy_many

注销正在接收推送通知的移动设备。将设备指定为移动设备令牌数组。

允许

  • 管理员

例子的身体

             
“push_notification_devices”“token1”“token2”

代码示例

旋度
              
旋度- x“职位”“https://{子域名}.zendes亚博k.com/api/v2/push_notification_devices/destroy_many.json”- uemail_address密码- h“application / json内容类型:- h“接受:application / json”- d{"push_notification_devices": ["token1", "token2"]} "
              
进口“fmt”“输入输出”“net/http”“弦”函数主要url:=“https://example.亚博zendesk.com/api/v2/push_notification_devices/destroy_many”方法:=“职位”有效载荷:=字符串NewReader”{“push_notification_devices”:(“token1”,“token2”} '要求的事情犯错:=httpNewRequest方法url有效载荷如果犯错! =fmtPrintln犯错返回要求的事情添加“内容类型”“application / json”要求的事情添加“授权”“基本< auth-value >”// Base64编码的"username:password"客户端:=http客户端res犯错:=客户端要求的事情如果犯错! =fmtPrintln犯错返回推迟res身体关闭身体犯错:=ioReadAllres身体如果犯错! =fmtPrintln犯错返回fmtPrintln字符串身体
Java
              
进口comsquareupokhttpOkHttpClient客户端OkHttpClientHttpUrl构建器urlBuilderHttpUrl解析“https://example.亚博zendesk.com/api/v2/push_notification_devices/destroy_many”newBuilderRequestBody身体RequestBody创建MediaType解析“application / json”""push_notification_devices \“\”token1 \“\”token2 \“\”""请求请求请求构建器urlurlBuilder构建方法“职位”身体addHeader“内容类型”“application / json”addHeader“授权”凭证基本“电子邮件”“你的密码”构建响应响应客户端newCall请求执行
Nodejs
              
varaxios需要“axios”var数据JSONstringify“push_notification_devices”“token1”“token2”var配置方法“职位”url“https://example.亚博zendesk.com/api/v2/push_notification_devices/destroy_many”“内容类型”“application / json”“授权”的基本< auth-value >”// Base64编码的"username:password"数据数据axios配置然后函数响应控制台日志JSONstringify响应数据函数错误控制台日志错误
Python
              
进口请求进口jsonurl“https://example.亚博zendesk.com/api/v2/push_notification_devices/destroy_many”有效载荷json加载”““{“push_notification_devices”:(“token1”,“token2”}”“”“内容类型”“application / json”响应请求请求“职位”url身份验证“<用户名>”' <密码> 'json有效载荷打印响应文本
鲁比(人名)
              
需要“net/http”uriURI“https://example.亚博zendesk.com/api/v2/push_notification_devices/destroy_many”请求HTTP帖子uri“内容类型”“application / json”请求身体“push_notification_devices”“token1”“token2”请求basic_auth“用户名”“密码”响应HTTP开始uri主机名uri港口use_ssl真正的|http|http请求请求结束

示例响应(年代)

200好了
              
// Status 200 OK