Where do I put my api_key ?
I want to add my API KEY but there is no option for it or how do I do it ,apart from it without the API key I am getting 403 Limit exceeded error
import requests
import json
url="https://in.yahoo.com/?p=us"
post_url = 'https://www.googleapis.com/urlshortener/v1/url'
payload = {'longUrl': url}
headers = {'content-type': 'application/json'}
r = requests.post(post_url, data=json.dumps(payload), headers=headers)
print (r.text)
As the docs for the Google URL Shortener service say:
If you follow the link to the blog post, it explains the details, but the relevant part here is:
So, what can you do?
Google obviously would prefer you to switch to their new and improved feature, Firebase Dynamic Links:
And they provide migration support.
For people who don't want to, or can't, do that, the best option is the same thing they recommend for consumers of the goo.gl website:
Notice that Bitly and Ow.ly both have APIs. They're somewhat similar to Goo.gl's—certainly closer than FDL—but not identical.