I have searched through here for other questions related to the same topic and cannot find a definite answer.
My problem seems the same as many others in that I cannot get a response from Google Places Api.
I am trying from within an iphone app, yes the code is correct , I have checked and in desperation just resorted to wiping out the code to just make a request using the examples provided by the Docs on Google Places.
Tried putting the url into a browser, always the same response, whichever browser.
{
"html_attributions" : [],
"results" : [],
"status" : "REQUEST DENIED"
}
I have tried making new keys, same result and yes the identifer for the app is also listed.
Is there a time frame before being able to use the key.
Here how I've done this
1)You need to login with your google account
2)Google APi Console will Appear
3)Look out at Screenshot
4)you will find Services over there ,click on it where you can have choose API you would like to use
5)then go to API Access as shown in you can get your Google API Key.
Thanks
Advice -use your own Google API key
You probably need 'sensor' parameter in your request URL, I guess.
Just set 'sensor=false&' in the URL and try it.
In order to use the google place API, you need to do the following steps on https://console.developers.google.com:
You need to go your project.
1: Activate Google places API depending upon your clients: iOS, Android or web.
2: Then go to the Credentials section on the left.
3: Generate a SERVER key.
Insert that key into your google place api call. Example:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=cruise&key=SERVERKEY
Its a simple GET Rest call.
instead of this
The url: https://maps.googleapis.com/maps/api/place/search/json?location=-74.006605,40.714623&radius=5000&types=bar|police&name=&sensor=false&key=Api_key
use this
The url:
(https://maps.googleapis.com/maps/api/place/search/json?location=-74.006605,%2040.714623&radius=5000&types=bar|police&name=&sensor=false&key=Api_key)
%20 is for space
Related
I am currently building a NodeJS backend app that is querying the Google Calendar API. I have setup a new project on Google Cloud API platform and have generated all the required credentials. As stated by the google calendar API page, the allowed queries per day is 1,000,000. Since I am only querying for testing purposes at the moment, I am sure that I haven't even hit a 100. Yet whenever I try to query the API it returns the error:
"The API returned an error: Error: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
Also I have noticed that the dev console has generated a API key for me. Where am I supposed to put that?
My initial thinking is that Google API requires me to perform an additional signup using some CLI tools or something along those lines to signup. If not, where am I supposed to sign up?
Thanks in advance.
Note: I already have all the information from the cloud platform such as client_id, client_secret, project_id.
In "Error: Daily Limit for Unauthenticated Use Exceeded", they key word is Unauthenticated. Your request to the Calendar API is missing an OAuth Access Token. You will need to research Google OAuth.
This question has been answered many times. Please learn how to search SO for similar questions whenever you post a new question. https://stackoverflow.com/search?q=google+oauth+%22daily+limit+for+unauthenticated%22
To anyone who comes across this post in the future. I fixed the issue by using the project generated by Google Calendar API site (https://developers.google.com/calendar/quickstart/nodejs) by clicked the big blue "Enable the google calendar api" and then changing the name of the quickstart project that was generated. I don't know why it works now but it does and it's been working quite stably so far. Lets see how to goes.
I'm using the API Explorer tool to create some request urls for google adsense here. Here is the request url that they gave me that gives a response of today's earnings:
https://www.googleapis.com/adsense/v1.4/reports?startDate=today&endDate=today&accountId=MY_ACCOUNT_ID&metric=EARNINGS&key={YOUR_API_KEY}
However, I don't know how to get my API key for google developer to be able to recreate this url in my code.
The API key is created on the Cloud Platform Console. Please refer to this document and you will be able to do it. Hope this helps!
The below api call used to return a feed of results that would have been on my homepage.
https://content.googleapis.com/youtube/v3/activities?home=true&maxResults=50&part=id%2Csnippet%2CcontentDetails&key=AIzaSyC0wL6aecu2rxiTNtW8uvtnb1kx9Kdlb4s
In the past day or so the feed I get has changed to be only videos from some channel called "Popular on YouTube".
Does anyone know why this API call changed? Is it a bug? Is there a different way to get an authenticated user's activity feed?
It turns out the home parameter for the activities api endpoint has been deprecated.
https://developers.google.com/youtube/v3/docs/activities/list
Sounds like you must have been using a shared API key.
Either case, "Popular on Youtube" is a Youtube channel by Youtube. Something has broken functionality and I believe it is referrer issue. With that, I suggest getting a new API Key.
You can learn more about and getting a free personal API Key, if you haven't done so. https://developers.google.com/youtube/v3/docs/errors
I am getting a Origin Mismatch error on Google Plus. Attaching the image below:
Read online about this:
1) In the document someone has mentioned that origin and scope should match. One has http and another has https. I am wondering where exactly in my Google API Console I can edit and change those items?
2) Here also someone has mentioned the same thing but I am wondering where can I find that place in google api console. The screenshot mentioned over here looks old.
Go to console.developers.google.com, select the project, and go to credentials under APIs & Auth. Then edit the settings for the particular client ID.
I read the following two pages on Google:
1) https://developers.google.com/google-apps/documents-list/#getting_a_list_of_documents_and_files
and
2) https://developers.google.com/accounts/docs/OAuth2WebServer
I can go as far as getting an access_token (OAuth2) to be used in a subsequent Google API call (I want to call Google Docs Listing or Google Drive).
I wanted to use curl or something similar and just form my https URL.
- As such in the 1st document states to form a URL as follows:
https: //docs.google.com/feeds/default/private/full
- In the 2nd document, the example states to use something like https: //www.googleapis.com/oauth2/v1/userinfo?access_token=xxxxx
(adding the access token to the call)
Several questions
- Do I call googleapis.com or docs.google.com?
- can I call https: //docs.google.com/feeds/default/private/full?access_token=xxxxx
just add the access token to the call?
thanks
You need some effort to approach a Google API the first time, but then it's easy and elegant:
Manual preparation (One-time action): Sign in to Google, create a project, enable the API in question, create new Cient ID.
Get OAuth code, refresh token and access token (one-time action).
Make the API call (repetitive arbitrary actions).
Here is a detailed explanation of the entire process - Steps to make a Google API call.
A practical sample based on the Google Calendar API with full demo code in a single HTML file can also be reviewed here - Easy and compact access to my Google calendars.
The fastest way to get started is probably the quickstart guide for the Google Drive API, which shows how to setup your environment and write a complete command-line app to upload a file to Drive:
https://developers.google.com/drive/quickstart
Hie you can go through the Google Docs Sample Available Here
it's a command line smaple but this same thing you can implement in android. it works for me. you will find "docs-cmdline-sample" in repo. that will help you.