Jump to content

Google API key into a script


Gayngel
 Share

You are about to reply to a thread that has been inactive for 3710 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Can you be a little more specific about what Google API you're using, and how you're invoking it?

If it happens to be the Maps API as used for SL maps, I can say it's a bit weird in that I don't seem to supply my key when invoking that API from an in-world MoaP javascript, and Google says such keys aren't used for recent Maps API versions, although I do seem to still be supplying it when accessing that API from a browser and it still works. That may need more investigation if starting a new Maps API project today.

I'm guessing, however, that you're using a different, non-Maps API. In that case, it's just a string you'll need to include in each properly formatted http request you issue to the API (at least for the few Google APIs I've used).

Link to comment
Share on other sites

I'd assume you'd simply replace the "APIKey" part of the string with the key you got from Google when you created your project in the developers console.

I've never used the Translate API, but I understand it to be a paid service these days, and AFAIK these services are all RESTful which suggests a lot more stuff would go into that http request, so I may be missing the point of that code sample.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3710 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...