/self Endpoint returns 498 Invalid Token for Valid OAuth Token

791
0
07-19-2018 05:12 PM
by Anonymous User
Not applicable

I have built a small utility which lives in an Azure function which takes an ArcGIS Online OAuth token as input and calls the community/self endpoint to retrieve some basic information about the user. The token is passed to the endpoint from another host which performed a OAuth flow with the use to retrieve the token in the first place.

Although the token is valid, and is accepted in other requests made from outside Azure, the Azure function is only able to call the self endpoint once, with any valid token, to retrieve the needed user information. For every request after that, whether the token is valid or invalid, or has changed since the last call to the endpoint, being a new token for the same user, or a token for a different user, the endpoint unexpectedly returns a 403 with the standard Invalid Token JSON content.

{"error":{"code":498,"message":"Invalid token.","details":[]}}

I say unexpectedly, because the request is made with f=json specified, and the expected result for an Invalid Token would be a 200 result, with the same error in the response body. 

Restarting the Azure function, which presumably migrates its host within the Azure cloud, allows for a single call to succeed, before all following calls to the self endpoint fail as described above with a 403

Is my Azure function's host being blacklisted after the first call to the endpoint which succeeds?

Is this type of operation not supported?

Any help to resolve this is greatly appreciated. 

-Paul

0 Kudos
0 Replies