Last answered:

13 May 2023

Posted on:

26 Jun 2021

1

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'
2 answers ( 0 marked as helpful)
Posted on:

14 Jun 2022

2

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

https://learn.365datascience.com/question/i-ve-found-some-api-s-that-doesn-t-require-authorization-to-use/

or, I did get this site working so I could follow along with the class as follows:

1. registering a free account at

https://apilayer.com

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)

Posted on:

13 May 2023

0

Thanks, steps you described woking perfectly. 

Submit an answer