Set Tags - need to know HWID

Answered

Comments

2 comments

  • Avatar
    Ivan Skoritzky
    0
    Comment actions Permalink

    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}
    x

     

    As 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

  • Avatar
    Wahyu Kurniawan
    0
    Comment actions Permalink

    Hi Ivan

    Thank you for your reply
    For 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!
     
    Thanks
    Wahyu

Please sign in to leave a comment.