Azure botapp allowing Instagram Basic Display API access

TheJasonDT 1 Reputation point
2020-02-26T14:07:39.34+00:00

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?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,389 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Marilee Turscak-MSFT 33,801 Reputation points Microsoft Employee
    2020-02-28T01:11:25.58+00:00

    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://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-facebook

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

    0 comments No comments

  2. TheJasonDT 1 Reputation point
    2020-02-28T10:04:19.03+00:00

    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://learn.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)

    0 comments No comments