norkunas / onesignal-php-api

OneSignal API for PHP
MIT License
234 stars 83 forks source link

Update Device Tags #43

Closed mczernin closed 7 years ago

mczernin commented 8 years ago

Hello again, sorry for bothering you again :) How do i get the following to work?

$api->devices->update('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx', [ 'tags' => '{"foo":"bar","this":"that"}', ]);

somehow nothing changes when i look at device list i also tried

'tags' => {"foo":"bar","this":"that"}

Best regards, Max

norkunas commented 8 years ago

Hello @mczernin,

Data that you provide for update is encoded to json format at the end, so you need to provide it only in the php format,