I'm using the getPrivileges (Account API) to retrieve the account's seller limit.
I'm referring to the documentation here: https://developer.ebay.com/api-docs/sell/account/resources/privilege/methods/getPrivileges
It says it only required one header, "All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization. This method has no additional required header"
I had a quick read in this documentation about how to make a call:
https://developer.ebay.com/api-docs/static/make-a-call.html
And it says for Authorization header format should be like this "
HTTP headers: Authorization = Bearer <Your-Application-token-value>
So essentially in java i've only added the authorization header to the httpRequest and supplied the authentication token. Like this:
HttpPost httpRequest = new HttpPost("https://api.ebay.com/sell/account/v1/privilege/";);
httpRequest.addHeader("Authorization", "Bearer " + [AUTH_TOKEN_HERE]);
But keep getting this error:
ebayResponseData: {
"errors" : [ {
"errorId" : 1001,
"domain" : "OAuth",
"category" : "REQUEST",
"message" : "Invalid access token",
"longMessage" : "Invalid access token. Check the value of the Authorization HTTP request header."
} ]
}