'Instagram OEmbed question - OAuthException 200 Provide valid app ID

I am facing an exception when trying to use Instagram OEmbed.

As stated in this page: https://developers.facebook.com/docs/graph-api/reference/instagram-oembed/

I sent an HTTP GET request to this endpoint:

https://graph.facebook.com/v12.0/instagram_oembed?url=https://www.instagram.com/p/CUsIdc5ql2b/&app

As stated in the documentation, I am using the "url" querystring parameter. However, I am getting an exception such as:

{
    "error": {
        "message": "(#200) Provide valid app ID",
        "type": "OAuthException",
        "code": 200,
        "fbtrace_id": "Acr4on4TtEYPIc2RQwqNmDL"
    }
}

So there is an error clearly stating that I need to "Provide valid app ID". However, there is no information about how to provide that app ID. I've tried a few, including:

https://graph.facebook.com/{app_id}/v12.0/instagram_oembed?url=https://www.instagram.com/p/CUsIdc5ql2b/

and

https://graph.facebook.com/v12.0/{app_id}/instagram_oembed?url=https://www.instagram.com/p/CUsIdc5ql2b/

with no luck. I am looking forward for solutions.



Solution 1:[1]

As CBroe pointed out in the comments, you need a valid access token, which you could add at the end of your url like this:

https://graph.facebook.com/v12.0/instagram_oembed?url=https://www.instagram.com/p/CUsIdc5ql2b?access_token=YOURTOKEN

You can look up further documentation here: https://developers.facebook.com/docs/graph-api/overview/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 miki5799