403 error in Sandbox when trying to getPrivileges for seller account
Hello,
Is the getPrivileges endpoint supported in Sandbox? If so, how do I fix this 403 error? Which likely means the seller account is "not set up" in sandbox.
seller_account_status_response = requests.get(
f"{EBAY_API_ENDPOINT}/sell/account/v1/privilege",
headers={"Authorization": f"Bearer {access_token}"},
timeout=30
)
seller_account_status_response.raise_for_status()
privileges_data = seller_account_status_response.json()
logger.info("eBay seller account status response: %s", privileges_data)
I have already validated that the Authorization token is correct and working with other API calls, such as getUser.
If this endpoint is not supported, that is fine. I can just mock the data in my dev environment as long as it will work in production.
3 comments
eutecticgaming
OP10 months ago@developer-support@ebay.com hello, can you please reply back and let me know next steps to troubleshoot this?
developer-support@ebay.com
Hi @eutecticgaming ,
The problem you are encountering could be due to the type of token you are using. It appears that you have utilized an application token generated through the client credentials grant flow. To address this issue, please ensure that you use a user token, which is created using the authorization code grant flow, when making a call to this API.
Best Regards,
eBay Developer Support
eutecticgaming
OP11 months agoI believe I am already using that method. In my app, it redirects me to a login page, I log in and get redirected back to my app and store the resulting code. Then I use that code to retrieve an access and refresh token.