question

elfe118 avatar image
0 Likes"
elfe118 asked ·

Get sale transactions

Hi! I'm the developer on the site and I have the task: get all sale transactions during last 3-24 hours. The site uses PHP 7.x. I load library https://github.com/davidtsadler/ebay-sdk-php by composer. And I use the example of code: https://github.com/davidtsadler/ebay-sdk-examples/blob/master/trading/11-get-my-ebay-selling.php After starting of code I get the error: > Error: Invalid IAF token. IAF token > supplied is invalid. I guess that I use the wrong token. In that ebay-sdk-php library is necessary to fill out the configuration file with data: 'credentials' => [ 'devId' => 'YOUR_PRODUCTION_DEVID_APPLICATION_KEY', 'appId' => 'YOUR_PRODUCTION_APPID_APPLICATION_KEY', 'certId' => 'YOUR_PRODUCTION_CERTID_APPLICATION_KEY', ], 'authToken' => 'YOUR_PRODUCTION_USER_TOKEN_APPLICATION_KEY', 'oauthUserToken' => 'YOUR_PRODUCTION_OAUTH_USER_TOKEN', 'ruName' => 'YOUR_PRODUCTION_RUNAME' I filled out `credentials`, `ruName`, but I don't understand where I can find `authToken` and `oauthUserToken`. Here https://developer.ebay.com/my/auth/?env=production∈dex=0 I pressed "Get OAuth Application Token" and got code: v^1.1#i^1#p^1#I^3#f^0#r^0#t^H4sI ... I don't know what is it: `authToken` or `oauthUserToken`. I wrote as `authToken`. As I wrote earlier, I am getting the error: > Error: Invalid IAF token. IAF token > supplied is invalid. Help me, please, to solve my task: Get all sale transactions during last 3-24 hours through PHP.
getordersebay-apisdk-php
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

elfe118 avatar image
0 Likes"
elfe118 answered ·
Thank you. I have already solved the problem. I used Oauth token instead of Auth-n-Auth. Those in the configuration into 'authToken' I need to write Auth-n-Auth token.
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

eram_developersupport avatar image
0 Likes"
eram_developersupport answered ·
Hi @elfe118, Could you please let me know which token you are using either Auth-n-Auth or Oauth? You should use OAuth token with the header X-EBAY-API-IAF-TOKEN This header supports the use of OAuth tokens for user authorization. To authorize the request, supply a valid User access token for the value of this header. For details on the User access tokens. REF: https://developer.ebay.com/devzone/xml/docs/Concepts/MakingACall.html#HTTPHeaders Best Regards, eBay Developer Support
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.