Question about testIamPermissions method in Billing API - api

I'm trying to use cloudbilling.billingAccounts.testIamPermissions in the APIs Explorer, but I get an error.
API URL
https://developers.google.com/apis-explorer/?hl=ko#p/cloudbilling/v1/cloudbilling.billingAccounts.testIamPermissions?resource=billingAccounts%252F01183E-6A3E97-BE2C7A&resource=%257B%250A%257D&_h=1&
Error Result
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}
The error message appears as 'Request contains an invalid argument', so the value entered in resource seems to be incorrect.
I entered billingAccounts / {billingAccountID} for resource, but I do not know why I get an error.
{billingAccountID} has entered the billing account ID you are using.
What value should be put in the resource?

You need to use your full ID "billingAccounts/012345-567890-ABCDEF`" as an string. Also avoid to share your private information for security reasons use examples instead.
Confirm that the other options of the API works for you.

Related

Unable to create in google spreadsheets

I was trying google APIs to create a new sheet but I am unable to achieve the goal
the error I am getting is
Invalid spreadsheet. spreadsheet: This user did not create this id.
so I thought I am doing something wrong did some research I got this link (https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/create) and tried it here (Try it! button) it gives the same error
{
"error": {
"code": 400,
"message": "Invalid spreadsheet.spreadsheetId: This user did not create this id.",
"status": "INVALID_ARGUMENT"
}
}
What am I doing wrong?
Just performing the following request will create a spreadsheet:
POST https://sheets.googleapis.com/v4/spreadsheets
No need to pass something in the body. The documentation is a bit confusing on that point as it says you should send an instance of Spreadsheet in the request body. But you don't have to.

MPGS retrieve session unexpected parameters

I tried to follow the online guideline to do the hosted session integration.
When testing Retrieve session api using postman, the error occurred.
{
"error": {
"cause": "INVALID_REQUEST",
"explanation": "Unexpected parameter 'merchantId'"
},
"result": "ERROR"
}
I did settle the correct parameter, merchantId and sessionId.
https://ap-gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/latest/operation/Session%3a%20Retrieve%20Session.html?locale=en_US
You don't actually include the text "merchantId". You have to provide a valid merchant ID. Click on the "URL Parameters" tab on the link you posted.
{merchantId} Alphanumeric + additional characters COMPULSORY
The unique identifier issued to you by your payment provider."
The same goes for "sessionId".

Error on Paysafe Card Payment API?

This may sound stupid but I keep getting this error for every request that I make for the Card Payments API.
{
"error": {
"code": "5270",
"message": "The credentials provided with the request do not have permission to access the data requested.",
"links": [
{
"rel": "errorinfo",
"href": "https://developer.optimalpayments.com/en/documentation/cardpayments/error-5270"
}
]
}
}
The error seems to indicate that I do not have permission to do something. Is this an access issue as I think I am using the proper key? Has anyone ever seen this error with Paysafe?
#Crazyshezy is correct. Write to Paysafe with the key that you are using and they will be able to isolate what permissions that you have or may not have with your API key.
i was getting same error. It was due to card expiry year. It should be 4 digit year(e.g 2017) but i was sending 2 digit year(17).

Hail API AccessToken method

I'm trying to get access token from hail after get an authorization code from url https://hail.to/oauth/authorise?client_id={$client_id}&redirect_uri={$redirect_url}&response_type=code&scope=user.basic+user.manage+org.basic+content.read+content.read+content.connections
After getting the code from the above url, the documentation they provide does not state what should be the correct parameter to get an access_token. The documentation says it should be a POST method to get access token by using url https://hail.to/api/v1/oauth/access_token?client_id={$client_id}&client_secret={$client_secret}&grant_type=authorization_code&code={$client_access_token_code}&redirect_uri={$redirect_url}.
When I try this, I get the following error response:
{
"error" : {
"message" : "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the \"grant_type\" parameter.",
"error_code" : null
}
}
If anyone has faced this problem, please help me out on this.
I don't know what should be the correct parameter for grant type.

Can't create replies to some existing youtube comments

I have a software, which allows you to create a reply to a comment on your youtube video. Therefore I use the youtube API v3 comments.insert method.
POST https://www.googleapis.com/youtube/v3/comments?part=id%2Csnippet&access_token=[access_token]
{
"snippet": {
"parentId": "parentId",
"textOriginal": "test message"
}
}
Most of the time the requests are successful. But for some comments I can't create replies this way. The API always returns:
{
"error": {
"errors": [
{
"domain": "youtube.comment",
"reason": "processingFailure",
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the <code>comment</code> resource in the request body to ensure that it is valid.",
"locationType": "other",
"location": "body"
}
],
"code": 400,
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the <code>comment</code> resource in the request body to ensure that it is valid."
}
}
I'm using a valid access token and the parentId is valid, too, because I can retrieve it through the API.
I took a look at the successful and failing requests, but didn't find any difference. So I assume that the request input isn't invalid as it is mentioned in the error message.
In my opinion this error isn't a transient error, because the same requests are still failing after some days.
I also tried to create a reply on such a comment through the API Explorer but the result was the same.
Does anyone have the same problems or am I doing something wrong?
When I go to the video and look at the comments directly, the comment with ID z13tjxdqnuygy1lga04cilcqxqipg1zbtbs has a "reply" option under it, while the comment with ID z13rgftjgw3bulyou04ccfnbjofztxg54yo0k does not. It seems that the user posted the comment via their Google+ page and disabled replies to their posts.