I am getting this error when I try to send push notifications from my server. I tried it using the Expo tool and I get the same error.
The request sent to the server was malformed or contained invalid parameters. It happens when I send a message to this token: ExponentPushToken[PSLHDLDkr4fEKPfX7r44ea]
At first I thought the issue was with the Python code for sending the messages but it looks like the same problem happens when I send using the Expo tool.
Is it only this token that’s affected?
No. I had several tokens that were throwing this error. After passing some data with the token such as the device os and version, I was able to figure out that they were all coming from one device running Android 6.0. It looks like the extra tokens were being created because I had updated several builds and the app was updated (expo build:android). I had to modify the python code to handle this and mark the token in token_active=false in my database. It would be nice if the code was updated to know how to handle this type of exception correctly.
Got it. Well, I’m glad you were able to get to the bottom of things! I agree it would be nice if the API could handle this exception more elegantly and we’ll look into doing so.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.