RESOURCE_NOT_FOUND post request from Postman v2/payments/authorizations/{authorization_id}/void - paypal

Trying to call post request from Postman
www.sandbox.paypal.com/v2/payments/authorizations/{authorization_id}/void
getting below response error:
{
"name": "RESOURCE_NOT_FOUND",
"message": "The specified resource does not exist.",
"debug_id": "e5eafe26bbc24",
"details": [
{
"issue": "INVALID_RESOURCE_ID",
"field": "authorization_id",
"value": "72J58097UL3794703",
"description": "Specified resource ID does not exist. Please check the resource ID and try again.",
"location": "path"
}
],
"links": [
{
"href": "https://developer.paypal.com/docs/api/payments/v2/#error-INVALID_RESOURCE_ID",
"rel": "information_link"
}
]
}

The RESOURCE_NOT_FOUND error occurs when the resource specified in the request path (72J58097UL3794703, in this case) is not valid for the specified operation. The most likely explanations are that 72J58097UL3794703 is from a different environment (live, not sandbox) or that it is something like an Order ID or capture ID, rather than an authorization ID.
Orders and captures cannot be voided. If you are not going to use an Order ID, forget it and do not capture nor authorize it. In the case of a capture, it's already finalized so you can refund it.

Related

Paypal create payment-tokens API return 422 Unprocessable Entity

I am using my paypal sandbox, and I am trying to use v2/vault/payment-tokens API to tokenize a credit card
Url:https://api.sandbox.paypal.com/v2/vault/payment-tokens
Method: POST
RequestBody(fake credit card that sandbox generated):
{
"source": {
"card": {
"number": "40320382525xxxx",
"expiry": "2022-11"
}
}
}
I can make sure that my sandbox have full scopes, my access token is right.
Below is the response:
{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "15c1b3e9d8161",
"details": [
{
"issue": "UNKNOWN_BUSINESS_ERROR",
"description": "There was an issue while processing your request."
}
],
"links": [
{
"href": "https://developer.paypal.com/docs/api/vault/v2/#error-UNKNOWN_BUSINESS_ERROR",
"rel": "information_link",
"method": "GET"
}
]
}
Does any one meet the same issue?
Will you have permissions to use /v2/vault/payment-tokens in live mode? This API shouldn't be integrated without guidance from PayPal
Try using a test credit card from https://developers.braintreepayments.com/guides/credit-cards/testing-go-live/node

How do I use Marketo REST API with Postman?

I'm having a hard time trying to figure out how to properly use the Marketo REST API using Postman for testing purpose.
So far I can Authenticate and get my access_token,
but when I try to create a folder... (properly authenticated)
endpoint: [POST] /rest/asset/v1/folders.json
body:
{
"description": "Test Folder",
"name": "Test",
"parent": {
"id": 1,
"type": "Folder"
}
}
I get:
{
"success": false,
"errors": [
{
"message": "name cannot be null.",
"code": "701"
},
{
"message": "parent cannot be null",
"code": "701"
}
],
"requestId": "408a#1720c00a893",
"warnings": []
}
I don't know what I'm doing wrong.
See an example in the Marketo API documentation
Create/Update folder request should be an application/x-www-form-urlencoded not application/json
So in Postman, you have to post a form with three parameters:
parent={"id":416,"type":"Folder"}
name=Test 10 - deverly
description=This is a test
For the parent parameter you should specify a specific json-like text, which is a usual format for folderId
For generic folders (not programs) you can provide just integer id, without JSON structure, this is not recommended but can be used for manual API tests

PSID is unsupported GET request Graph API?

I'm trying to get labels associated with participants of conversations on my fb page.
My GET request: <pageID>/conversations?fields=participants,id&access_token=<PageAccessToken>
The POST:
{
"participants": {
"data": [
{
"name": "Jim Bean",
"email": "numbers#facebook.com",
"id": "2821512231253160"
},
{
<my page info>
]
},
"id": "<convo link>"
},
When I click on the participant's ID, I get the following error.
"message": "Unsupported get request. Object with ID '2821512231253160' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph...",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "AwlTn9Vx3mfPtRGnquaHm8k"
Thus, I cannot request labels associated with PSIDs without being able to get info on my user's PSIDs.
What am I missing? How can I retrieve PSIDs from conversations?

Invite to Facebook Game App with invite token from invitable_friends

I can fetch my invitable_friends list, and retrieve an invite token for each one:
["data": [
{
"id": "inviteTokenA",
"name": "User A"
},
{
"id": "inviteTokenB",
"name": "User B"
}..]
Then, I want to invite "User A" to my Game App. I'm trying to do it with a POST request like: "/me/apprequests", with params (message = "Some message", to = "inviteTokenA")
(If a don't send the "message" parameter, I get an error response)
I guess it's not the proper way, because I've got a success response:
{
"request": "6029343172911",
"to": [
"someID"
]
}
And someID is my Facebook ID, no matter what I send as "to" parameter.
I mean, it's an app request to myself.
And if I try to make request "/inviteTokenA/apprequests" I get:
{
"error": {
"message": "(#803) Some of the aliases you requested do not exist: AVnop7tyDDSaYC0FQYRQNIKOTIHQcmYJk2c-uSF1fLf1UUNbc0WXKt62lhLvvJZdSUrxHyYTdxFUCTkLDw6ON_I1qinF3rq6HVVfU0m7jzgj7w",
"type": "OAuthException",
"code": 803,
"fbtrace_id": "DrHiMQl8jWT"
}
}
You can not send invites via API.
The user of your app needs to send them via the Request Dialog, as described here: https://developers.facebook.com/docs/games/services/gamerequests#launchingrequestdialog
When calling that dialog, you can pass one or more of the tokens you get from the invitable_friends endpoint.

Wordpress /users/me endpoint request forbidden

Using Wordpress's plugin WP REST API version 1, there is an endpoint called /users/me which response with data for the currently logged-in user. When I requested /users/me I got 403 Request Forbidden error. But If I requested /users/1 (where 1 is the user ID) then everything works. So why am I getting 403 error for /users/me endpoints? I'm using Postman to send my request:
THIS WORKS (userID 1 is the currently logged-in user):
http://example.com/wp-json/users/1?access_token={myAccessToken}
DOESN'T WORK:
http://example.com/wp-json/users/me?access_token={myAccessToken}
However, when using WP REST API version 2, /users/me works but it only returns a subset of what version 1 would have returned. The data is incomplete by comparison (i.e. email, first name, last name ...etc)
http://example.com/wp-json/wp/v2/users/me?access_token={myAccessToken}
{
"avatar_urls": {
"24": "http://2.gravatar.com/avatar/29b3ef85f13fedb43f84e6cb4a634e73?s=24&d=mm&r=g",
"48": "http://2.gravatar.com/avatar/29b3ef85f13fedb43f84e6cb4a634e73?s=48&d=mm&r=g",
"96": "http://2.gravatar.com/avatar/29b3ef85f13fedb43f84e6cb4a634e73?s=96&d=mm&r=g"
},
"description": "",
"id": 1,
"link": "http://example.com/author/admin/",
"name": "admin",
"url": "",
"_links": {
"self": [
{
"href": "http://example.com/wp-json/wp/v2/users/1"
}
],
"collection": [
{
"href": "http://example.com/wp-json/wp/v2/users"
}
]
}
}