我正在使用IBM Bluemix Rest API用於Push Notifcation,並使用Spring Boot 1.5.6.RELEASE和Java 1.8。我正在使用RestTemplate從Java代碼調用以下API。我正在向通過APNS註冊的ios設備(Apple推送通知服務)發送推送通知。sendMessage IBM Bluemix PushNotification Rest API正在註銷設備
我將推送通知服務綁定到BlueMix上的Java應用程序,並從VCAP_SERVICES獲取url,clientSecret和appSecret。
我注意到一個奇怪的行爲,並想知道如果其他人也經歷過相同的。
請參考下面的步驟:
- 我使用登記設備 「registerDevice」 POST API。其終點爲「http://imfpush.xxxxxxxx.xxxx.bluemix.net/imfpush/v1/apps/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/devices」。
- 我使用「getDevices」GET API驗證設備是否已成功註冊。其終點爲「http://imfpush.xxxxxxxx.xxxx.bluemix.net/imfpush/v1/apps/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/devices」。
- 然後,我使用「sendMessage」POST API發送推送通知。端點爲「http://imfpush.xxxxxxxx.xxxx.bluemix.net/imfpush/v1/apps/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/messages」。
我注意到的怪異行爲是在調用sendMessage POST API後,我在步驟1中註冊的設備不再註冊。如果我回到步驟2並再次調用「getDevices」API,則在步驟3之後,設備不再註冊。它返回以下響應:
{ 「pageInfo」:{ 「TOTALCOUNT」:0, 「計數」:0 }, 「裝置」:[] }
這是中的錯誤「sendMessage」POST API?
請幫
在此先感謝