ApnsPHP icon indicating copy to clipboard operation
ApnsPHP copied to clipboard

Invalid Device Token -- 64 chars required?

Open CayenneSF opened this issue 10 years ago • 1 comments

In attempting to use this for a Passbook update, I am getting an "invalid device token" error.

Fatal error: Uncaught exception 'ApnsPHP_Message_Exception' with message 'Invalid device token '9275172de8d10xxx5d4d9d4afdf5eff0'' in /home/xxx/apns/ApnsPHP/Message.php:77

Looking at line 77, the regex test appears to require 64 characters ('~^[a-f0-9]{64}$~i'). The device token I got back from the device, though, is much shorter. Am I using the wrong token?

CayenneSF avatar Dec 15 '14 16:12 CayenneSF

Hi,

you have to use the pushToken. The naming of the property is not that good.

swey avatar Jan 10 '15 05:01 swey