我正在玩抄写库(
@L_502_0@),尝试访问Magento商店产品,但我面临一些问题(这可能是Magento配置).
我使用以下代码:
OAuthService service = new ServiceBuilder().provider(Magento17Api.class).apiKey(MAGENTO_API_KEY).apiSecret(MAGENTO_API_SECRET).build(); OAuthRequest request = new OAuthRequest(Verb.GET,MAGENTO_REST_API_URL + "/products"); service.signRequest(accessToken,request); Response response = request.send(); System.out.println(response.getBody());
但我总是收到这个回应:
{"messages":{"error":[{"code":0,"message":"Admin role not found"}]}}
我失踪了什么