How to integrate magento api, It's getting 500 error but it working on postman, we request volley get request and put parameter in url and header also but it still not working....pls help me
RequestQueue requestQueue = Volley.newRequestQueue(HomeProductActivity.this);
JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.GET, "http://128.199.158.123/Devtest/api/rest/categories/?oauth_consumer_key=87fb627751a50a2666e9c4501a4bc85f&oauth_token=f4cb9148deb67e05a3531e05b9edf923&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1501669923&oauth_nonce=VcTJZa&oauth_version=1.0&oauth_signature=xIrlLY0D1CGXkD49OduVqZhIVec=", "",
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
// display response
Log.d("Response", response.toString());
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.d("Error.Response", "hfjf");
}
}) {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
final Map<String, String> headers = new HashMap<>();
headers.put("Authorization", "OAuth oauth_consumer_key=\"87fb627751a50a2666e9c4501a4bc85f\",oauth_token=\"f4cb9148deb67e05a3531e05b9edf923\",oauth_signature_method=\"HMAC-SHA1\",oauth_timestamp=\"1501750716\",oauth_nonce=\"Imh2HF\",oauth_version=\"1.0\",oauth_signature=\"b%2F5UoepFy6QL7oFDBMAh9ij0yGM%3D\"");
return headers;
}
};
getRequest.setRetryPolicy(new DefaultRetryPolicy(80000,
DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
DefaultRetryPolicy.DEFAULT_TIMEOUT_MS));
requestQueue.add(getRequest);
requestQueue.add(getRequest);