error_type“:”OAuthAccessTokenException“,”code":400,.. (instagram)

强颜欢笑 提交于 2019-12-24 16:08:15

问题


I am accessing the instagram API to display content from a specific account, however I get this error:

/**/ JSON_CALLBACK({"meta":{"error_type":"OAuthAccessTokenException","code":400,"error_message":"The access_token provided is invalid."}})

I have registered my app in https://www.instagram.com/developer/

bit when accessing here for example I get that above error:

   var endpoint = "https://api.instagram.com/v1/users/" + user_id + "/media/recent/?";
    endpoint += "?count=99";
    endpoint += "&client_id=" + client_id;
    endpoint += "&callback=JSON_CALLBACK";

回答1:


You cannot access this API with client_id anymore, you have to authenticate, get an access_token and make API call with access_token, see documentation for this endpoint here: https://www.instagram.com/developer/endpoints/users/#get_users_media_recent



来源:https://stackoverflow.com/questions/35066490/error-typeoauthaccesstokenexception-code400-instagram

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!