我正在使用 REST API 将 Pinterest 集成到我的 Android 应用程序中,但在尝试访问类别时出现错误。
我的代码:
String url = "https://api.pinterest.com/";
String allCategories = "/v2/boards/categories/";
RestClient client = new RestClient(url + allCategories);
String response = "";
try {
client.AddParam("limit", "36");
try {
client.Execute(RequestMethod.GET);
} catch (Exception e) {
e.printStackTrace();
}
response = client.getResponse();
} catch (Exception e) {
System.out.println(">>> Exception >>> " + e + " >>> Message >>> "
+ e.getMessage());
}
System.out.println(">>> response >>> " + response);
Log.d(">> Login response >>> ", response);
我从端点返回以下错误:
{
"message": "Please upgrade your app!",
"error": "Authentication failed: Please upgrade your app!"
}