Uber Invalid OAuth 2.0 credentials provided Uber Authentication In android

亡梦爱人 提交于 2019-12-05 13:40:10
Suraj Rao

It could be because there is no space provided between 'bearer' and token value in your header . httpPost.setHeader("Authorization","Bearer"+token);

It needs to be Authorization: Bearer <mytoken>

UPDATE

you are setting data values as name-value pairs. You have to set json if content type is json. Check this answer: How to send POST request in JSON using HTTPClient?

You have to set:

 JSONObject holder = getJsonObjectFromMap(params);

//passes the results to a string builder/entity
StringEntity se = new StringEntity(holder.toString());

//sets the post request as the resulting string
httpost.setEntity(se);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!