Azure Bot Service OAuth Connection String Not Maintaining Token

TheJasonDT 1 Reputation point

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?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,142 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 15,696 Reputation points Microsoft Employee

    @TheJasonDT Please note that your question appears to be related to bot services and not the underlying web app. While we are in the process of moving all products to Q&A, Bot Services is still being supported here. We kindly request you to share your question there so cognitive service experts can continue assisting you.

    Thank you for your understanding.

    0 comments No comments