Hello,
I would like to be able to check the expiration date of an access token obtained with OAuth2 code flow.
According to the documentation, I should be able to use the "self" resource and provide a "token about which you want to get information about. This can be any type of token: User Token, App Token, or API Token. The token can be active or expired.Information such as client_id for which the token was generated, developer credentials item id, token's expiration date. This information will be returned in the appInfo response object."
https://developers.arcgis.com/rest/users-groups-and-items/portal-self/#appinfo-response-properties
The problem is that when I browse:
https://organization.example.com/<context>/sharing/rest/portals/self?f=pjson&token=foo&appInfoToken=bar, I get the following reply:
As you can see, on my side, contrary to the example, I get everything but the "expirationDate":
Any idea ?
Thanks,
Nicolas
Support was able to reproduce on 11.5 (I am running 11.3) and could not understand why is the "expirationDate" missing. So they logged the following BUG:
BUG-000177206: Unable to retrieve the 'expirationDate' token from the 'portal-self' endpoint in the OAuth2 token response.
We identified that using an API token, it is displayed on AGOL but not using an OAuth2 token. But the documentation states: "This can be any type of token: User Token, App Token, or API Token"...