I tried to create a message via php for specific device token, and I used 'devices' parameter but response was Unknown Devices "response":{"Messages":["CODE_NOT_AVAILABLE"],"UnknownDevices":{"":["device token"]}}

although I used same token in test devices and notification sent successfully.

How I can solve this problem?

asked 09 Dec '14, 08:56
kholoud's gravatar image


Do you have this device registered in the system? Test device bypass this check.

permanent link
answered 10 Dec '14, 04:33
shader's gravatar image


Yes, the device was registered.

I knew the problem caused as "devices" parameter contained less than 10 devices

from Remote API Guide: If the Debug Mode is turned OFF, and you send the /createMessage request that contains less than 10 device tokens to Pushwoosh API, the server returns the “CODE_NOT_AVAILABLE” value for “Messages”, and an empty key for Unknown Devices instead of the Message Code. https://www.pushwoosh.com/programming-push-notification/pushwoosh-push-notification-remote-api/#PushserviceAPI-Method-messages-create

when I turn on Debug mode the response changed but debug mode turn off automatically after 1 hour. I want to ask if there is a way to send notification for devices less than 10 without turn on debug mode.

Thanks for your help.

permanent link
answered 10 Dec '14, 09:05
kholoud's gravatar image


Does it work fine with DEBUG mode? Could you send your token and createMessage request?

(10 Dec '14, 13:09) shader shader's gravatar image

Getting same response":{"Messages":["CODE_NOT_AVAILABLE"].... When I used same token in test devices and notification not delivered.

Invalid token: 1 Total: 1

permanent link
answered 10 Dec '14, 13:15
Vibrantappz's gravatar image


This is CORRECT response! First thing you should check is that Gateway in the app configuration matches the provisioning profile.

(10 Dec '14, 13:43) shader shader's gravatar image
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 09 Dec '14, 08:56

question was seen: 3,662 times

last updated: 10 Dec '14, 13:43