Reputation: 859
The problem is as stated above. If I try to subscribe to a push notification via the url: https://iid.googleapis.com/iid/v1/{token}/rel/topics/{topic}
, I always get the following response: {"error":"InvalidToken"}
I have tried using both GET
and POST
methods but still the same response.
I have checked if the Token is a valid token by using the following url: https://iid.googleapis.com/iid/info/{token}
which return the correct data like this:
{
"application": "com.chrome.windows",
"subtype": "wp:http://localhost/#2A58747F-DEF7-4C55-8073-126B2D168-V2",
"authorizedEntity": "856365479457",
"platform": "WEBPUSH"
}
If my token is valid, then why I am getting the error invalid token?
Upvotes: 2
Views: 2806
Reputation: 8742
I believe you are hitting a GET
request with topic subscribe, try POST
with the same parameters.
Or you are hitting incorrect url: Hitting an url without ../rel/..
also produces the same error.
Upvotes: 5