I am experiencing an issue where the Google CSE API returns the below error message. It was working fine yesterday but is now returning the error message. Also, I have tried setting it up on multiple devices, and has still returned the same error, I am wondering if anybody else if having a similar issue?
<HttpError 400 when requesting https://www.googleapis.com/customsearch/v1?q=search+test%3F&cx=017576662512468239146%3Aomuauf_lfve&key=AIzaSyDAtLtCNLRicMACGZEOnJE38gQ_omhbSKE&alt=json returned "Bad Request">
This is the line of code executing the search:
res = service.cse().list(q=query, cx=g_cse_id, start=start).execute()
API is working key is the issue. Try generating a new one from the google console. I tried it with my key and same request is working.
You can get the key from here https://developers.google.com/custom-search/json-api/v1/overview
Related
Good afternoon, let me ask
I created a service API using Laravel, but one of the API urls when I sent the response parameter was 403 or Forbidden. even though before it was fine, it worked smoothly. And I raised it to the server instead it became Forbide. Anyone know why? thank you for answering
If it is ok on local and getting a forbidden error on the server, the problem might be caused by the webserver application. please take a look at this link.
We use Google API https://www.googleapis.com/appsmarket/v2/licenseNotification/appId endpoint and it works some time, but for now it returns 503 response with error message
{"error":{"errors":[{"domain":"global","reason":"backendError","message":"Temporary error. Please try later."}],"code":503,"message":"Temporary error. Please try later."}}
Could anyone suggest what it can be and how to fix this problem?
I'm trying to get the list of albums as it is written here: https://developers.google.com/picasa-web/docs/1.0/developers_guide_protocol#ListPhotos
GET https://picasaweb.google.com/data/feed/api/user/default
Authorization: Bearer MY_ACCESS_TOKEN_HERE
So, the problem is that I get "404 Unknown user" responce. Strange thing but when I make the same request with the same access token from another PC, I get the correct responce (200 OK and list of albums).
I didn't google anything useful except the similar issue which was on API for Python (like here: AuthSub: (404, 'Not Found', 'Unknown user.')). Did anyone face the same issue?
So, the problem was that Google Photos server handles the requests incorrectly, if these requests contain some wrong Cookie headers.
I say "incorrectly" because other Google APIs (like Drive, Contacts, etc.) didn't have this issue.
So, all that I had to do is to add flag INTERNET_FLAG_NO_COOKIES in InternetOpenUrl function:
InternetOpenUrl(NetHandle, PChar(Url), PChar(Header), Length(Header), INTERNET_FLAG_RELOAD or INTERNET_FLAG_NO_COOKIES, 0);
After that sending HTTP requests using InternetOpenUrl with the flag won't return this error anymore.
I got an exception frequently while getting and posting activities via GooglePlus Page API. The details are given below:
APIs:
https://www.googleapis.com/plusPages/v2/people/userId/activities/collection
https://www.googleapis.com/plusPages/v2/people/userId/activities
Exception:
{"error":{"message":null,"code":500}}
Can anyone tell me why i am getting the above exception and how to fix this?
I like to call 500 a server hiccup. Normally you can just send the request again and it will work. Why you are getting it only Google knows. Just send it again.
INTERNAL_SERVER_ERROR (500)
Error code Description internalError The request failed due to an
internal error.
You can find it in Googles standard error responses page.
I asked another question earlier about a 400 error. (http://stackoverflow.com/questions/6099557/the-remote-server-returned-an-error-400-bad-request-when-trying-to-access-e)
While waiting for responses, I tried a few other things and have now come across another unhelpful error. ("The remote server returned an error: (401) Unauthorized.").
I am trying to connect to http://mailserver/owa/. When I paste this URL into my browser, and type my credentials, I can get logged in just fine. When I try to connect with the same credentials through WebDav, I get the 401 error. How do the same credentials work one way, but not another way?
I tried using the authenticate method found here: http://blog.mbcharbonneau.com/2006/10/26/using-net-and-webdav-to-access-an-exchange-server/
I still get the same 401.
This seems like it should be so straightforward, yet all I can find out there are forums of people with the same problem. Nobody can provide and answer or working example. Has anyone actually ever been able to do this successfully before!?