Problem with example 3_4_exchange-rates-api-getting-a-jason-repsonse
url https://api.exchangeratesapi.io/latest API now requires access code.
see response.text message below.
'{\n "success": false,\n "error": {\n "code": 101,\n "type": "missing_access_key",\n "info": "You have not supplied an API Access Key. [Required format: access_key=YOUR_ACCESS_KEY]"\n }\n}\n'
This is obviously an old post but I just got the same when I was working through this class yesterday. Short answer is this course needs to be updated. But until it is:
There's another post where someone has shared some APIs that are free to use without an API key - that's one option
or, I did get this site working so I could follow along with the class as follows:
1. registering a free account at
to get an API key
2. Then in the Jupyter notebook, add a dict with your API key
headers= {
"apikey": "yourAPIkeyhere"
}
3. The site base URL has also changed - base_url = "https://api.apilayer.com/exchangerates_data/latest"
4. request format is
response = requests.get(base_url, headers=headers)
Thanks, steps you described woking perfectly.