oppoPUSH廣告增值服務API對接指引_第1頁
oppoPUSH廣告增值服務API對接指引_第2頁
oppoPUSH廣告增值服務API對接指引_第3頁
oppoPUSH廣告增值服務API對接指引_第4頁
oppoPUSH廣告增值服務API對接指引_第5頁
已閱讀5頁,還剩14頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

Opush商業(yè)產(chǎn)品

增值服務-API推送2023年Q1新品介紹CONTENTS01

增值服務API字段說明02

發(fā)送示例03常見Q&A請聯(lián)系商務確認OPUSH增值服務API權益開通情況,開通后即可使用相關權益的API推送能力;參考OPPO開放平臺文檔《通知欄消息》/new/developmentDoc/info?id=11236配置消息PUSH增值服務API通知欄消息體設置字段說明:1.1增值服務API字段說明名稱類型是否必填默認值描述small_picture_urlString否無自定義小圖url字數(shù)限制300以內(nèi),中英文均以一個計算。圖片要求尺寸144*144px,文件大小為50k以內(nèi),格式為PNG/JPG/JPEG。small_picture_urlmedium_picture_urlString否無自定義中圖url【填寫,則style必須為4】字數(shù)限制300以內(nèi),中英文均以一個計算。圖片尺寸在201*201px內(nèi),文件大小在256KB以內(nèi),格式為PNG/JPG/JPEG。big_picture_urlString否無自定義大圖url【填寫,則style必須為3】字數(shù)限制300以內(nèi),中英文均以一個計算。圖片尺寸在876*324px內(nèi),文件大小在1M以內(nèi),格式為PNG/JPG/JPEG。buttonsjson數(shù)組否無擴展參數(shù),詳情見P4-P5optionjson數(shù)組否無擴展參數(shù),詳情見P61.1增值服務API字段說明-buttons字段名稱類型是否必填默認值描述nameString是無按鈕名稱clickActionTypeint否0點擊動作類型0,啟動應用1,打開應用內(nèi)頁(activity的intentaction)2,打開網(wǎng)頁4,打開應用內(nèi)頁(activity);【非必填,默認值為0】5,IntentschemeURLclickActionActivityStringclick_action_type為1/4/時必填無應用內(nèi)頁地址【click_action_type為1/4/時必填,長500】示例:clickActionTyp為1時填寫ernalclickActionTyp為4時填寫ponent.InternalActivityclickActionUrlStringclick_action_type為2與5時必填無網(wǎng)頁地址【click_action_type為2與5時必填,長度2000】示例:clickActionTyp為2時填寫?key1=val1&key2=val2clickActionTyp為5時填寫command://test?key1=val1&key2=val2actionParametersString否無動作參數(shù),打開應用內(nèi)頁或網(wǎng)頁時傳遞給應用或網(wǎng)頁【JSON格式,非必填】字符數(shù)不能超過4K,示例:{“key1”:“value1”,“key2”:“value2”}注意:如果是打開網(wǎng)頁并且這里攜帶了參數(shù),click_action_url后面就不能攜帶參數(shù)1.1增值服務API字段說明-buttons字段buttons示例[{"name":"點擊","clickActionType":"2","clickActionUrl":"https://xxxx","actionParameters":{"key":"value","field":"value"}},{"name":"點擊2","clickActionType":"4","clickActionActivity":"xxx","actionParameters":{"key":"value2","field":"value2"}}]1.1增值服務API字段說明-option字段名稱類型是否必填默認值描述notification_groupString否無設置分組,將免折疊展示。值都可以設置group1,消息將在端側(cè)進行分組,最多保持3條消息免折疊,發(fā)送第四條時會刪除第一條消息保留最新3條消息免折疊m_urlString否0c2s點擊監(jiān)測地址/nnim?a1=__IP__&a2=$os$&a3=$nt$a4=__IMEI__&a5=$t$&a6=__OAID__三方監(jiān)測鏈接宏替換字段說明詳見下頁senior_pushboolean否false設置為true時不限量且不占用推送額度unfoldboolean否false展開免折疊top_notification_bar_showboolean否false置頂material_id(待上線)string否無素材ID,此ID需要登陸OPPOPUSH推送平臺-增值服務獲取。詳見Q&A如何獲取素材IDlabel_id(待上線)Int否無消息標簽ID,設置了此字段,消息展示在通知欄后會在通知欄消息右上角增加一個標簽,如:“熱”。值范圍(1-5):1:熱2:惠3:紅包4:直播5:活動1.1增值服務API字段說明-三方監(jiān)測鏈接宏替換字段說明名稱字段替換內(nèi)容舉例系統(tǒng)$os$固定為:"android"網(wǎng)絡類型$nt$"wifi"、”2g”、”3g”、”4g”、”unknown”當前時間$t$System.currentTimeMillis()由應用傳入IMEI__IMEI/$im$md5(IMEI)IP__IP__IP02OAID__OAID__安卓10的oaID安卓10的oaID/nnim?a1=__IP__&a2=$os$&a3=$nt$a4=__IMEI__&a5=$t$&a6=__OAID__1.1增值服務API字段說明-返回碼codemessage0成功33API權限限制;可能存在以下情況,具體原因請聯(lián)系商務:API未配置廣告主信息廣告主商業(yè)化賬務余額不足廣告主商業(yè)化賬務日預算不足應用沒有當前投放的商業(yè)化組合能力權限應用當前投放的商業(yè)化組合能力消息條數(shù)超過限額10000registration_id格式不正確;批量單推及廣播API推送過程中,非法regid將返回該返回碼,其他目標推送成功CONTENTS01

增值服務API字段說明02

發(fā)送示例03常見Q&A1.1發(fā)送示例-單推CURL發(fā)送示例小圖curl--location--requestPOST'/server/v1/message/notification/unicast'--header'Content-Type:application/x-www-form-urlencoded'--data-urlencode'auth_token=78cbb197-4009-47c9-932a-f709eb375f79'--data-urlencode'message={"target_type":2,"target_value":"realme_CN_b6bbd94b59cdb5df8391642c1509b7fe","notification":{"title":"HelloWorld","content":"HelloWorld","small_picture_url":"/image_search/src=http%3A%2F%2F%2Fedpic%2Ffe%2F79%2F18%2Ffe7918e9ea98301501af5e39b3292e67.jpg&refer=http%3A%2F%2F&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1659693403&t=c1ca40e2e35caa635b7c23de98a3506e"}}'中圖curl--location--requestPOST'/server/v1/message/notification/unicast'--header'Content-Type:application/x-www-form-urlencoded'--data-urlencode'auth_token=78cbb197-4009-47c9-932a-f709eb375f79'--data-urlencode'message={"target_type":2,"target_value":"realme_CN_b6bbd94b59cdb5df8391642c1509b7fe","notification":{"style":4,"title":"HelloWorld","content":"HelloWorld","medium_picture_url":"/it/u=1544107626,481305795&fm=253&fmt=auto&app=138&f=PNG?w=160&h=160"}}'1.1發(fā)送示例-單推CURL發(fā)送示例大圖curl--location--requestPOST'/server/v1/message/notification/unicast'--header'Content-Type:application/x-www-form-urlencoded'--data-urlencode'auth_token=78cbb197-4009-47c9-932a-f709eb375f79'--data-urlencode'message={"target_type":2,"target_value":"realme_CN_b6bbd94b59cdb5df8391642c1509b7fe","notification":{"style":3,"title":"HelloWorld","content":"HelloWorld","big_picture_url":"/image_search/src=http%3A%2F%2F%2Ftupian%2F20120818%2Fertongshouhuihuangsedeyazi_1694023_small.jpg&refer=http%3A%2F%2F&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1659693330&t=76fee0390a2a3b998d2585aba207f19e"}}'按鈕curl--location--requestPOST'/server/v1/message/notification/unicast'--header'Content-Type:application/x-www-form-urlencoded'--data-urlencode'auth_token=78cbb197-4009-47c9-932a-f709eb375f79'--data-urlencode'message={"target_type":2,"target_value":"realme_CN_b6bbd94b59cdb5df8391642c1509b7fe","notification":{"title":"HelloWorld","content":"HelloWorld","buttons":"[{\"clickActionType\":0,\"name\":\"按鈕1\"},{\"clickActionType\":2,\"clickActionUrl\":\"\",\"name\":\"按鈕2\"}]"}}'1.1發(fā)送示例-單推CURL發(fā)送示例皮膚curl--location--requestPOST'/server/v1/message/notification/unicast'--header'Content-Type:application/x-www-form-urlencoded'--data-urlencode'auth_token=78cbb197-4009-47c9-932a-f709eb375f79'--data-urlencode'message={"target_type":2,"target_value":"realme_CN_b6bbd94b59cdb5df8391642c1509b7fe","notification":{"title":"HelloWorld","content":"HelloWorld","option":"{\"bg_picture_id\":\"642bc006a07d1368d5fb3b23\",\"senior_push\":\"true\"}"}}'消息標簽curl--location--requestPOST'/server/v1/message/notification/unicast'--header'Content-Type:application/x-www-form-urlencoded'--data-urlencode'auth_token=78cbb197-4009-47c9-932a-f709eb375f79'--data-urlencode'message={"target_type":2,"target_value":"realme_CN_b6bbd94b59cdb5df8391642c1509b7fe","notification":{"title":"HelloWorld","content":"HelloWorld","option":"{\"label_id\":1,\"senior_push\":\"true\"}"}}'1.1發(fā)送示例-單推CURL發(fā)送示例分組免折疊curl--location--requestPOST'/server/v1/message/notification/unicast'--header'Content-Type:application/x-www-form-urlencoded'--data-urlencode'auth_token=78cbb197-4009-47c9-932a-f709eb375f79'--data-urlencode'message={"target_type":2,"target_value":"realme_CN_b6bbd94b59cdb5df8391642c1509b7fe","notification":{"title":"HelloWorld","content":"HelloWorld","option":"{\"notification_group\":\"group1\",\"senior_push\":\"true\"}"}}'消息展示不受折疊規(guī)則影響,持續(xù)獨立展示展開免折疊curl--location--requestPOST'/server/v1/message/notification/unicast'--header'Content-Type:application/x-www-form-urlencoded'--data-urlencode'auth_token=78cbb197-4009-47c9-932a-f709eb375f79'--data-urlencode'message={"target_type":2,"target_value":"realme_CN_b6bbd94b59cdb5df8391642c1509b7fe","notification":{"title":"HelloWorld","content":"HelloWorld","option":"{\"unfold\":\"true\",\"senior_push\":\"true\"}"}}'非通知欄首條也能完整展示消息圖片素材1.1發(fā)送示例-單推CURL發(fā)送示例置頂curl--location--requestPOST'/server/v1/message/notification/unicast'--header'Content-Type:application/x-www-form-urlencoded'--data-urlencode'auth_token=78cbb197-4009-47c9-932a-f709eb375f79'--data-urlencode'message={"target_type":2,"target_value":"realme_CN_b6bbd94b59cdb5df8391642c1509b7fe","notification":{"title":"HelloWorld","content":"HelloWorld","option":"{\"top_notification_bar_show\":\"group1\",\"senior_push\":\"true\"}"}}'用戶首次下拉通知中心,發(fā)送的消息內(nèi)容卡片將置頂展示;用戶收起通知中心后再次下拉,則恢復原展示順序1.1發(fā)送示例-廣播CURL發(fā)送示例1-保存通知欄消息體curl--location--requestPOST'/server/v1/message/notification/save_message_content'--header'Content-Type:application/x-www-form-urlencoded'--data-urlencode'title=HelloWorld'--data-urlencode'auth_token=78cbb197-4009-47c9-932a-f709eb375f79'--data-urlencode'content=HelloWorld'--data-urlencode'senior_push=true'2-推送通知欄消息curl--location--requestPOST'/server/v1/message/notification/broadcast'-

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論