question

TheJasonDT-4736 avatar image
0 Votes"
TheJasonDT-4736 asked ·

Azure botapp allowing Instagram Basic Display API access

I have a botapp in Azure, and was previously using the now-deprecated API. I am trying to move over to the new Instagram Basic Display API.

As previously done, the botapp can take care of the access-token handling by using settings OAuth Connection Settings. However, when trying to do so now with my new client id/secret, I test the connection but Instagram respond with a {"error_type": "OAuthException", "code": 400, "error_message": "Invalid redirect_uri"}.

Is this something that Azure needs to update for the new Instagram Basic Display API or is there a way for me to solve this in these settings?

I have also, in the same settings area, selected service provider of Generic Oauth2 and thus included auth url, token url, refresh url myself - but still I get the same issue as there is no option for redirect uri.

Can someone help point me in the right direction here?

azure-ad-multi-factor-authentication
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MarileeTurscak avatar image
0 Votes"
MarileeTurscak answered ·

Hi! Yes, you need to update the redirect URI in the app registration in the Azure portal. The redirect URI in your app registration needs to match exactly what you have in the app website on instagram (or in your code if applicable).

You can't register an instagram for myapp1.com and generate the url for mysite2.com. It must match a URL registered with the API key. Make sure there aren't any extra slashes or mismatches between http and https.

Some good examples here:

https://docs.microsoft.com/en-us/azure/app-service/configure-authentication-provider-facebook

https://docs.microsoft.com/en-us/azure/active-directory-b2c/identity-provider-facebook

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TheJasonDT-4736 avatar image
0 Votes"
TheJasonDT-4736 answered ·

The issue here, was that I did not include the correct redirect URL on the Instagram App Page (https://token.botframework.com/.auth/web/redirect - as mentioned https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service-4.0&tabs=csharp )

However, regarding the above, under the new Instagram Basic Display API. Would that be the same URL I would use for the following?

Deauthorize Callback URL (would this be handled by bot service?)


Data Deletion Requests (presumably this I have to deal with myself)

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.