07-04-2023 07:07 AM
I'm trying to have some fun with eBay APIs, but I'm encountering some issues.
My need is to create a small PHP file that retrieves the list of products available in my eBay store. I then need to synchronize this product list with my inventory. Every time I try to do anything, I always get the following error message. Can someone help me?
Can anyone provide me with some guidance to understand where I'm going wrong?
Best regards,
"message": "Invalid access token",
"longMessage": "Invalid access token. Check the value of the Authorization HTTP request header."
07-04-2023 09:41 AM
Most APIs need OAuth authorization to gain access. There are two types of OAuth.
1. "Client credentials" is for an application to access public data. It requires an application token.
https://developer.ebay.com/api-docs/static/oauth-client-credentials-grant.html
2. "Authorization grant" is for accessing data within a user account. It requires a user token.
https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html
If you are accessing your own account, then you will need to implement the Authorization Grant and acquire a user token. Review the steps in the sidebar of the above link.