
[英]LDAPException: Invalid Credentials (49) Invalid Credentials with grails
[英]Invalid API Credentials
我现在可以连接到我的API,但是以某种方式告诉我“ Invalid API Creadentials”我确实执行了addHeader,但它没有传递给api
RequestParams p = new RequestParams();
p.add("Username","asd");
p.add("Password","asdqwe");
SISOB_APIURL = "http://services.lbcexpress.com/sisob/api/Values?";
client = new AsyncHttpClient();
client.addHeader("API_KEY","HESOYAM");
client.addHeader("API_SECRET","BAGUVIX");
client.get(this,SISOB_APIURL,p, new JsonHttpResponseHandler(){
@Override
public void onSuccess(int statusCode, Header[] headers, JSONArray response) {
super.onSuccess(statusCode, headers, response);
Toast.makeText(MenuActivity.this, response.toString(), Toast.LENGTH_LONG).show();
}
@Override
public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
super.onFailure(statusCode, headers, responseString, throwable);
Toast.makeText(MenuActivity.this, responseString.toString(), Toast.LENGTH_LONG).show();
}
});
感谢您回答我的问题,我的问题是密钥名称,现在它可以正常工作了,
client.addHeader("APIKEY","HESOYAM");
client.addHeader("APISECRET","BAGUVIX");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.