I have recently set up the Oauth Connection String (in settings in my Bot Service in Azure) with the Instagram Basic Display API - however, it seems the Bot Service is not maintaining the token.
It works at first but over time (maybe an hour) I get:
"message": "Error validating access token: Session has expired on Friday, 28-Feb-20 12:00:00 PST. The current time is Friday, 28-Feb-20 15:10:48 PST.",
"type": "OAuthException",
"code": 190,
I believe the issue is that with the IG Basic Display API you get a short term token (1 hour) that you have to trade for a long term token (6 months). I don't believe the bot service is doing this correctly (it is getting the short-term correctly but then perhaps saving and trying to maintain that over 6 months rather than trading it for the 6 months token?), or perhaps there is an issue on my behalf?
Insight here would be great as I would prefer not to maintain the token myself if this solution works.
Can someone replicate this?