3

I am using the Google Cloud Messaging services described at https://developers.google.com/instance-id/reference/server but I am getting a HTTP response status of 400 and this response text:
{"error":"InvalidTokenVersion"}

At the time I write this, that exact error code has zero results on Google! Has anyone else encountered it? I could understand "InvalidToken" but it is the "Version" bit which is confusing me.

I'd like to see a nice list of all the possible error codes for the https://iid.googleapis.com/iid/info/ and https://iid.googleapis.com/iid/v1/*/rel/topics/* services, if you know where that is?!

All the GCM pages say at present is...

HTTP status 400 (Bad request) - request parameters are missing or invalid. Check error messages for detailed information.


Background information:
I am using a registration token from an Android device which still shows a log of successful notifications in the GCM Diagnostics (part of Google Play Developer Console). So surely the token cannot be wrong?
If I try a token value of "bum" I get error "InvalidToken" instead.
However, trying to send a new notification with https://gcm-http.googleapis.com/gcm/send results in the "InvalidRegistration" error, so I guess something has gone screwy.
I'd like to claim that I've changed nothing recently, but something to do with SSL on the server might have expired I suppose.

Magnus Smith
  • 5,895
  • 7
  • 43
  • 64
  • Hi Magnus Smith. Just wanted to check in if you were able to figure this out? :) – AL. Feb 24 '17 at 05:41
  • Nope. And now everything has been superseded by FCM anyway! – Magnus Smith Feb 24 '17 at 07:18
  • Thanks for replying back. :D I see. I managed to see another [post](http://stackoverflow.com/q/42418935/4625829) where the same response is shown. I have a feeling that this might be related to the format of the token. When you posted this, were you using a token with a colon (`:`) (*new format*)? – AL. Feb 24 '17 at 07:25
  • 1
    I'm sorry, I cannot remember about a colon. Since this was an Android token, I'm sure I was just grabbing whatever token the client app was given by GCM. – Magnus Smith Feb 24 '17 at 07:34
  • I see. Thanks so much anyways. Cheers! :) – AL. Feb 24 '17 at 07:35

1 Answers1