Set Tags - need to know HWID
AnsweredHi
I need to call this API for set tag for device that registered
{
"request":{
"application": "XXXXX-XXXXX", // your Pushwoosh application code
"hwid": "8f65b16df378e7a6bece9614e1530fb2", // hardware device ID used in /registerDevice function call
"tags": {
"StringTag": "string value",
"IntegerTag": 42,
"ListTag": ["string1","string2"],
"DateTag": "2015-10-02 22:11", //note the time is in UTC
"BooleanTag": true, // valid values are - true, 1, false, 0, null
}
}
}
However, I don't know how can I get HWID. Is it a value that return when registerDevice method has called? It's said pushToken. Is HWID and PushToken the same?
Awaiting your response, many thanks before...
-
Hello Wahyu,
You are correct, the hwid should be obtained from the successfull /registerDevice method call and it differs from push token.
Here is the example:
x
| Pushwoosh request:
| Url: https://XXXXX-XXXXX.api.pushwoosh.com/json/1.3/registerDevice
| Payload: {"request":{"application":"XXXX-XXXX","hwid":"b1b5556233381e32","v":"5.5.5","device_type":3,"userId":"b1b5556233381e32","device_name":"Phone","language":"ru","timezone":25200,"android_package":"br.com.ek******","jailbroken":0,"device_model":"Xiaomi Redmi Note 4","os_version":"9","idfa":"486333fc-dd21-4afe-9695-762bdecc3b2b","app_version":"2.0.02","push_token":"fYTm9d_fe04:APA91bHfs2YK8Ue6JKj7s8EUS7GCSJZdmL7k_SqPlDCnI2ArsVNHcinPmk9afbGHb2SvGF2dc60aPA3p3LJCZGo9Ru8LJNj5IKpriIqho3t-C3pB8hZgadOWcsY5-S87-su2a2sM-wpw","sounds":[]}}
| Response: {"status_code":200,"status_message":"OK","response":null}
xAs you can see, this request contains hwid and push token as well.
Please note that you can always contact us via help@pushwoosh.com or via Contact Us form in order to receive more timely assistance:
https://help.pushwoosh.com/hc/en-us/requests/new
Regards,
Ivan
-
Hi Ivan
Thank you for your replyFor now, I have tried one of the method as below:pushNotification.getPushwooshHWID(function(token) {console.warn('Pushwoosh HWID: ' + token);//alert('HWID: ' + token);localStorage.setItem("HWID", token);});and I got the HWID successfully.Why I need this, because when I use setTags API, it require HWID, not the device token.So this issue is considered solved!ThanksWahyu
Please sign in to leave a comment.
Comments
2 comments