Pravin Bhapkar
Pravin Bhapkar

Reputation: 613

PushWoosh Error : status code : 210 status_message: Invalid device token for Android

I am trying to register device token on pushwoosh services using API but it's returning me following response (Form Pushwoosh service) :

{ status_code: 210,
 status_message: 'Invalid token: apa91bhosngjexchs528yuy-y4woqtkoo5b3ydddkh29etjm6eg9thg5urchcqaae32lavevq5vdco6mbyozyld4mqajg_t8-aaqnxiz6fr1gwnml7maurolpibo7-hj3at5l3i7zvzw',
 response: null }

I am using Same API for iOS and it's working fine for iOS. But the problem is with Android device. Also device token is correct (Started from "AP91...") and App is registered onGCM as well.

Thanks for help.

Upvotes: 0

Views: 662

Answers (1)

Pravin Bhapkar
Pravin Bhapkar

Reputation: 613

I got the solution and it's silly mistake I have done.

Just Uploading Answer if someone new learner get stuck, so it will helpful.

While making API call to pushwoosh registration we are sending following request in API.

"request":{
          "application":"84170-XXXXX",
          "push_token":deviceInfo.deviceToken,
          "language":"en",
          "hwid": deviceInfo.HardwareID,
          "timezone": 3600,
          "device_type":deviceType
       }

Mistake was I missed hwid which is unique (We are using device Mac address now). Also for Android "device_type" =3 and for ios "device_type"=1 But I earlier I was sending 1 for both (And thats the issue).

Now I am sending it according to device type. (As per given in pushwoosh docs). and it's working fine now.

Thanks.

Upvotes: 1

Related Questions