eBay post-order api - postman

Trying to learn the eBay post-order api using Postman. I have put together a simple check_eligibility call using a listing to see how it works. The PostMan http call follows.
POST /post-order/v2/inquiry/check_eligibility HTTP/1.1
Host: api.ebay.com
X-EBAY-API-IAF-TOKEN: TOKEN AgAAAA**AQAAAA**aAAAAA**0QqhYQ**........
Content-Type: application/json
X-EBAY-C-MARKETPLACE-ID: EBAY_US
Accept: application/json
{ /* CheckInquiryEligibilityRequest */
"itemId": 125119365456,
"transactionId": 0
}
No matter how I structure the call I get a 401 unauthorized return. I am using a Auth'n'Auth token which according to eBay documentation, https://developer.ebay.com/DevZone/post-order/concepts/MakingACall.html#example, is acceptable.
Any thoughts?
Thank you in advance.

Related

With facebook graph API 4.0 How to programatically send friend requests between test users?

This used to work years ago, but not anymore it seems. I'm using the facebook graph API to programatically generate test users and send/confirm friend requests.
It works creating test users:
User A
POST https://graph.facebook.com/v4.0/${APP-ID}/accounts/test-users HTTP/1.1 body{name=userA&access_token=${ACCESS-TOKEN}&installed=false}
RESPONSE: {“id":"106485800749210","login_url":"https:\/\/developers.facebook.com\/checkpoint\/test-user-login\/106485800749210\/?is_sandbox=0&sandbox_asset_type=test_user&page_id=0","email":"yciziemdeb_1568798987\u0040tfbnw.net","password":"1408448545"}
POST https://graph.facebook.com/v4.0/${APP-ID}/accounts/test-users HTTP/1.1 body{installed=true&permissions=email%2Cuser_friends&access_token=${ACCESS-TOKEN}&uid=106485800749210&owner_access_token=${OWNER-ACCESS-TOKEN}}
RESPONSE: {"id":"106485800749210","access_token":"******…","login_url":"https:\/\/developers.facebook.com\/checkpoint\/test-user-login\/106485800749210\/?is_sandbox=0&sandbox_asset_type=test_user&page_id=0","email":"yciziemdeb_1568798987\u0040tfbnw.net"}
User B
POST https://graph.facebook.com/v4.0/${APP-ID}/accounts/test-users HTTP/1.1 body{name=userB&access_token=${ACCESS-TOKEN}&installed=false}
RESPONSE: {"id":"113912670000851","login_url":"https:\/\/developers.facebook.com\/checkpoint\/test-user-login\/113912670000851\/?is_sandbox=0&sandbox_asset_type=test_user&page_id=0","email":"pmztcoojcx_1568799008\u0040tfbnw.net","password":"2095538830"}
POST https://graph.facebook.com/v4.0/${APP-ID} accounts/test-users HTTP/1.1 body{installed=true&permissions=email+user_friends&access_token=${ACCESS-TOKEN}&uid=113912670000851&owner_access_token=${OWNER-ACCESS-TOKEN}}
RESPONSE: {"id":"113912670000851","access_token":"******…","login_url":"https:\/\/developers.facebook.com\/checkpoint\/test-user-login\/113912670000851\/?is_sandbox=0&sandbox_asset_type=test_user&page_id=0","email":"pmztcoojcx_1568799008\u0040tfbnw.net"}
But fails when sending friend request:
POST https://graph.facebook.com/v4.0/106485800749210/friends/113912670000851 HTTP/1.1 body{access_token=${USER.A-ACCESS-TOKEN}}
RESPONSE: Bad Request : {"error":{"message":"(#33) This object does not exist or does not support this action","type":"OAuthException","code":33,"fbtrace_id":"AhXLj4h44ydX3n0dsJO4Dj5"}}
What am I doing wrong? Here is the documentation for facebook graph API /{user-id}/friends edge:
https://developers.facebook.com/docs/graph-api/reference/v4.0/test-user/friends

Google Photos REST API "pageSize" and "pageToken" parameters causing 400 Bad Request

I'm trying to get all media items in my Google Photos library and referred following documentation link.
https://developers.google.com/photos/library/guides/list
Documentation says client can request pages using pageSize and provided following example.
GET https://photoslibrary.googleapis.com/v1/mediaItems
Content-type: application/json
Authorization: Bearer OAUTH2_TOKEN
{
"pageSize":"100",
}
i think the comma after 100 is a documentation error and i removed it from request, but whenever i add pageSize (or pageToken) parameter, server always return with 400 Bad Request <p>Your client has issued a malformed or illegal request.<ins>That’s all we know.</ins>
Here are some example REST API calls i tried
GET /v1/mediaItems HTTP/1.1
Host: photoslibrary.googleapis.com
Content-Type: application/json
Authorization: Bearer xxx
{
"pageSize":10
}
GET /v1/mediaItems HTTP/1.1
Host: photoslibrary.googleapis.com
Content-Type: application/json
Authorization: Bearer xxx
{
"pageSize":"10"
}
GET /v1/mediaItems HTTP/1.1
Host: photoslibrary.googleapis.com
Content-Type: application/json
Authorization: Bearer xxx
{
"pageToken":"blha blha"
}
Please note that whenever i removed the json from request body, it start returning 200 OK with predefined pageSize. but i would like to control the pageSize and request next pages using pageToken.
Thanks for any guidance on this matter.
I just started looking at this too. Those parameters shouldn't be passed in the body. They are query parameters. So something like this:
https://photoslibrary.googleapis.com/v1/mediaItems?pageSize=100
That worked for me at least. Check out further documentation at https://developers.google.com/photos/library/reference/rest/v1/mediaItems/list to review information about the query parameters.

identifying the proper syntax for using HTTP dataset in ADFv2

I am able to successfully use Postman to authenticate and subsequently get data housed within a sandbox but I cannot figure out how to specify the same data within ADFv2.
I'm expecting to retrieve, temporarily store and later use a bearer token that this API generates. This token is then used in the second step that actually downloads the data I want in JSON format.
For the Authentication step, Postman generates code that looks this:
POST /v1/oauth/token HTTP/1.1
Host: api.sandbox.COMPANY.com
Ocp-Apim-Subscription-Key: MYKEY
Content-Type: multipart/form-data; boundary=----
WebKitFormBoundaryALPHANUM
cache-control: no-cache
Postman-Token: MYTOKEN
Content-Disposition: form-data; name="key"
MYKEY
Content-Disposition: form-data; name="grant_type"
vapi_key
------WebKitFormBoundaryALPHANUM--
I've created a linked HTTP and REST connection in ADFv2 with the base URL of "https://api.sandbox.COMPANY.com" and using no authentication.
I cannot figure out how to translate the functional Postman connection to a way that ADFv2 will work. Thoughts?
You could check this example.
https://learn.microsoft.com/en-us/azure/data-factory/connector-http#dataset-properties

Scanning a rest api web service using acunetix

I have a request post the send in acunetix scanner , but don't know how to send it and how to specify the post method , because when i added the headers in the "custom headers" option in acunetix scanner i got the get method sendded instead of the post one .
This is my request to send:
POST /Test/new_date HTTP/1.1
Host: app-test-ext
Content-Type: application/json
Cache-Control: no-cache
{UserName:test01,Password:poper}

Reviewboard API ignores request body

Have installed reviewboard 2.5.7.
If I create review request from commit using UI it works fine.
If I using API it creates empty request and looks like ignore the JSON body at all.
POST http://myhost/api/review-requests/
Authorization: token bla-bla
Accept: application/json
{
"changenum": null,
"commit_id": "e235168b0f0528d006fa2872bf582896ae121909",
"create_from_commit_id": true,
"force_text_type": null,
"repository": "myrepo",
"submit_as": null
}
Does API really supports request from commit?
Got it: that api isn't supports JSON request.
It should be application/x-www-form-urlencoded with form parameters.