I'm trying to push message to specific device, while sending message using API createMessage method, I get unknown device for the specific device.

when calling 'listTestDevices' I get the relevant device in the response. I use the same device from the response in createMessage but still getting the error.

listTestDevices response: {"status_code":200,"status_message":"OK","response":{"TestDevices":[{"name":"5s1","type":"1","pushtoken":"3123013f8aca27f06a07be1a952cece8a9f403ad1701ced3823897d643759bca","description":""}]}}

createMessage request: { "request": { "application": "XXXX-XXXX", "auth": "**MyToken*", "notifications": [ { "send_date": "now", "content": "BE test", "wp_type": "Toast", "wp_count": 3, "devices": [ "3123013f8aca27f06a07be1a952cece8a9f403ad1701ced3823897d643759bca" ], "link": "http://pushwoosh.com/" } ] } }

asked 06 Feb, 15:42
sagiashke's gravatar image

sagiashke
112

edited 06 Feb, 16:11

Hello,

Could you please remove this device from Test Devices section in the Control Panel, obtain new token from console logs and use it in your API request? The thing is, that sometimes when you set some device as Test Device, it does not appear among the subscribers of your application, which effectively makes it impossible to send notification to that device via API request.

Regards, Ivan

permanent link
answered 07 Feb, 05:04
iskoritzky's gravatar image

iskoritzky
2166

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×300
×45
×12

question asked: 06 Feb, 15:42

question was seen: 242 times

last updated: 07 Feb, 05:04