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.
Related
I am using the Qualtrics API to create contacts in a mailing list. In making a call to https://ca1.qualtrics.com/API/v3/mailinglists/ML_identity/contacts I am pushing a json string containing extRef. However, I keep getting the following response:
"httpStatus": "400 - Bad Request",
"error": {
"errorMessage": "Unexpected json key provided: extRef",
"errorCode": "RP_9"
},
The documentation clearly states extRef is what the field is called. What am I missing here?
The field should be externalDataRef instead of extRef (Qualtrics is inconsitent when it comes to that field). See: https://api.qualtrics.com/api-reference/reference/researchCore.json/paths/~1mailinglists~1{mailingListId}~1contacts/post
Note that the API call is specific to Research Core Contacts. XM Directory uses a different API call to add a contact.
This question already has answers here:
400 BAD request HTTP error code meaning?
(10 answers)
Closed 3 years ago.
This is my first time using an API, and i'm trying to figure out what exactly i'm doing wrong here. I'm trying to do the simple tutorial as seen here
I'm using Vb.net and the code i'm using is...
Public Sub New()
Dim webClient As New System.Net.WebClient
Dim iplookup As String = webClient.DownloadString("https://www.googleapis.com/civicinfo/v2/elections?key=<AIzaoKpBLK6uOqCJovCHmbHWYavDxx4cA-3_v8>")
console.WriteLine(iplookup)
End Sub
And I keep getting a 400 bad request error and i'm not sure what I'm doing wrong. Any and all help is much appreciated. As I said, this is my first time using an API so please dumb it down if you could. Also, I changed a few characters in my key to post this.
Accessing the link you used on the code, you get more details about the error, specifically this:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "keyInvalid",
"message": "Bad Request"
}
],
"code": 400,
"message": "Bad Request"
}
}
Meaning you API Key is invalid. First of all, I surely don't think the "<" and ">" are part of the key, so try removing that first. Then, you should check you account to see if you are using the correct key. If it still doesn't work, check restrictions.
Go to your Google API Console, on the left side click on Credentials, and there should be your Key. If it's not, create one. Check your restrictions to make sure you can access it, then click the little copy button on the right side to make sure your are not copying it wrong. Replace the APIKEYHERE and nothing else on the following link with your key, making sure to not add anything else, and try to access it in your browser. If you have no setting in your API you should get an Error 403, meaning you didn't configure the access: googleapis.com/civicinfo/v2/elections?key=APIKEYHERE
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.
I want to create new ASA job using rest end point with input output and query for job.
I've followed this link
https://learn.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-job
and formed below url according to above link
https://management.azure.com/subscriptions/{subscription-id}/
resourcegroups/{resourcegroup-name}/providers/Microsoft.StreamAnalytics/
streamingjobs/dynamicStream?api-version=2015-10-01
Though I've provided api version query parameter, postman is giving me below error
{
"error": {
"code": "MissingApiVersionParameter",
"message": "The api-version query parameter (?api-version=) is required for all requests."
}
}
Any idea what am I doing wrong ?
Api for creating new input for stream analytics job is behaving in same way
Thank you for reading !!!
POSTMAN issue !
Tried using different method and it's working .
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.