Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://api.exchangeratesapi.io/latest requires access key #79

Open
bob-rohan opened this issue Apr 1, 2021 · 3 comments
Open

https://api.exchangeratesapi.io/latest requires access key #79

bob-rohan opened this issue Apr 1, 2021 · 3 comments

Comments

@bob-rohan
Copy link

Hi, great little util. Used this last month was fine, now getting pretty terse error.

✖ Something went wrong :(

Traced the error in source, not much of an idea. But spotted what I think must be the default API here

const API = config.get('apiSource') || 'https://api.exchangeratesapi.io/latest';

Trying to access directly receive the following error:

{ "success": false, "error": { "code": 101, "type": "missing_access_key", "info": "You have not supplied an API Access Key. [Required format: access_key=YOUR_ACCESS_KEY]" } }

Perhaps I've missed somewhere the API Access key is provided, if not suggests the endpoint now require auth and new endpoint required.

@bob-rohan
Copy link
Author

As per #80

@arlidge
Copy link

arlidge commented Sep 18, 2021

If you sign up for an API key at https://exchangeratesapi.io/ and in the "cash.js" modify line 19 to this:

http://api.exchangeratesapi.io/latest?access_key=YOURAPIKEY

You should then be able to make api calls again. One downside is, the standard plan does not allow for https calls, only http which is concerning. I will probably be finding another currency converter to use.

But that does fix the problem.

@bwagner
Copy link

bwagner commented Oct 20, 2021

In the meantime, the url has changed to:

http://api.exchangeratesapi.io/v1/latest?access_key=YOURACCESSKEY

So as mentioned by @arlidge, line 19 of cash.js needs to be adapted to:

const API = 'http://api.exchangeratesapi.io/v1/latest?access_key=YOURACCESSKEY';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants