question

xiao-742768 avatar image
0 Likes"
xiao-742768 asked ·

https://api.ebay.com/post-order/v2/return/search 401

$header = [ 'Authorization'=> 'TOKEN '.$this->_config['authorization'], 'X-EBAY-C-MARKETPLACE-ID'=>'EBAY_US', 'Content-Type'=> 'application/json', "Accept"=>"application/json", ]; in Production,token other api that's no problem now return 401
401post-order
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.

xiao-742768 avatar image
0 Likes"
xiao-742768 answered ·
help!!!!!!!!!!!!!!!!!!!!
· 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.

sanjeev_developersupport avatar image
0 Likes"
sanjeev_developersupport answered ·
Hi @xiao-742768, 401 Unauthorized client error indicates the request has not been applied because it lacks valid authentication. Can you make sure you are using the valid token? If it still fails please provide us with the following details: 1. eBay Developer Username 2. Sample request 3. Did this work previously or are you trying to make this API call for the first time? 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.

xiao-742768 avatar image
0 Likes"
xiao-742768 answered ·
1、Developer Username:terryair 2、PHP: $client = new \GuzzleHttp\Client(['base_uri' => ' https://api.ebay.com/post-order/']); $header = [ 'Authorization'=> 'TOKEN '.$this->_config['authorization'], 'X-EBAY-C-MARKETPLACE-ID'=>'EBAY_US', 'Content-Type'=> 'application/json', "Accept"=>"application/json", ]; $res = $client->request('GET', 'v2/return/search', [ 'headers' => $header, 'verify' => false ]); Client error: `GET https://api.ebay.com/post-order/v2/return/search` resulted in a `401 Unauthorized` response 3、this API call for the first time authorization Other places can be normal use @sanjeev_developersupport
· 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.

nttj3879 avatar image
0 Likes"
nttj3879 answered ·
help!!!! @sanjeev_developersupport
· 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.

nttj3879 avatar image
0 Likes"
nttj3879 answered ·
Please give me a PHP demo,Thank you very much,normal use authorization to other api
· 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.

nttj3879 avatar image
0 Likes"
nttj3879 answered ·
GET /post-order/v2/return/search HTTP/1.1 Host: api.ebay.com Accept: application/json Authorization: TOKEN v^1.1#i^1#I^3#f^0#p^3#r^0#t^H4sIAAAAAAAAAOVXfWwURRTv9UsrVoxiJUTjuWA0rXs3u3d7d7v2Tg/ugOs3vStCjSGzu7Pt0r3dY2ev14uQNI1WiAlB0UiIhAYINhG1xBAxRgJCGgMKCaJCAsEoiUQbIRCBPyQ4e23hWiMFiqaJ+89m37z35r3f+83beaC7tKyyd2Hv5XLHPYV93aC70OFgpoGy0pKqB4oKZ5UUgDwFR1/3nO7inqKz1RgmtZTQjHDK0DFydiU1HQs5YZBKm7pgQKxiQYdJhAVLEuLh+jqBdQEhZRqWIRka5YxFghT0gQAHAgwPRJ/k8bJEqo/6TBhBSuFEGXk9Xq+H9Ym8CMk6xmkU07EFdStIsYDhaYahAZ8AHoHlBc7v4jhPK+VcjEysGjpRcQEqlAtXyNmaebHePFSIMTIt4oQKxcLz443hWCTakKh25/kKjeAQt6CVxmO/5hkyci6GWhrdfBuc0xbiaUlCGFPu0PAOY50K4dFg7iD8YagRQBIDkQwJ0gH+7kA53zCT0Lp5HLZElWklpyog3VKt7ESIEjTE5UiyRr4aiItYxGm/FqWhpioqMoNUdG54aUs82kw5401NptGpyki2M2UIn3wBAFiOCrUbFkaaJhnJFNSzIzsNuxvBedxW8wxdVm3UsLPBsOYiEjYaDw6TBw5RatQbzbBi2SHl63GjIHoDrXZVh8uYttp1u7AoSZBw5j4nLsEoJ26w4K6xwuf3cSzkpAAHkcix41lhn/U7YUbILk64qcltx4JEmKWT0OxAVkqDEqIlAm86iUxVFj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vDVVz1c+5HAMnrlYd7JvwZ6vX13zW8Xh1/pLD9W/d/qFwT92L/dWRbVO7/mB4fL9BYQ1HV8UEQAA Content-Type: application/json X-EBAY-C-MARKETPLACE-ID: EBAY_US
· 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.

nttj3879 avatar image
0 Likes"
nttj3879 answered ·
HTTP/1.1 401 Unauthorized Content-Length: 0 Cache-Control: private Date: Sat, 09 Nov 2019 04:56:02 GMT RlogId: t6q%60rrqkuq%60%3F%3Ckuvtbwptipse*03%3E37%3C1%29pqtfwpu%29osu%29fgg%7E-fij-16e4e84e533-0x1fc Set-Cookie: ebay=%5Esbf%3D%23%5E;Domain=. ebay.com;Path=/ Set-Cookie: dp1=bu1p/QEBfX0BAX19AQA**6188ade2^;Domain=. ebay.com;Expires=Mon, 08-Nov-2021 04:56:02 GMT;Path=/ WWW-Authenticate: IAF,TOKEN,ESAMS,APP,ASSERTION,IP, X-Content-Type-Options: nosniff X-EBAY-C-REQUEST-ID: ri=EGgH23e5979t,rci=58ea6574e64c33bc X-EBAY-C-VERSION: 1.0.0 X-EBAY-ESB-UPSTREAM: returnsvc.vip.ebay.com X-EBAY-SVC-TRACKING-DATA: ul=en-US&nqc=AA**&bs=0&nqt=AA**&!_epec=7,6&uc=1 X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Connection: keep-alive Strict-Transport-Security: max-age=31536000
· 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.

nttj3879 avatar image
0 Likes"
nttj3879 answered ·
'Authorization'=>'TOKEN '.$token => 'Authorization'=>'IAF '.$token is OK!
· 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.