Currency Converter at TechnoHacks
Hello connections,
I'm excited to share #task4 of my internship with The TECHNOHACKS EDUTECH in Web development under the Technohacks - 'Lets Grow Together' Program
#BATCH8
Task:CURRENCY CONVERTER
IDE: VSCODE
- HTML
- CSS
- JAVASCRIPT
- API --> ExchangeRate-API
GitHub Repository Link:https://github.com/prabhatrsharma/TechnoHacks-CurrencyConverter.git
Hosted Website Link: https://prabharsharma.github.io/TechnoHacks-CurrencyConverter/
To know MORE about TECHNOHACKS EDUTECH Website:
VISIT Technohacks Edutech:
Linkedin||
Twitter||
Telegram||
Instagram||
Youtube||
Thanking, Techno Hacks: Mr. Sandip Gavit
Please review and comment with your worthy suggestions.
To obtain an API key for the exchange rate API mentioned in your code, you would typically follow these steps:
-
Choose an API Provider: The code you provided uses the
https://v6.exchangerate-api.com
URL for fetching exchange rates. You need to visit the provider's website to sign up and obtain an API key. -
Sign Up and Create an Account: Visit the provider's website (in this case,
https://www.exchangerate-api.com
) and look for a "Sign Up" or "Get Started" button. Follow the registration process to create an account. -
Generate an API Key: After signing up and verifying your account, you will likely be given access to an API dashboard or portal. Look for an option to generate a new API key. This key will be used to authenticate your requests to the API.
-
API Documentation: The API provider should provide documentation that explains how to use the API, including how to structure requests, what endpoints to use, and how to include your API key for authentication.
-
Replace 'YOUR-API-KEY': In your JavaScript code, locate the URL where you make the API request, and replace
'YOUR-API-KEY'
with the actual API key you obtained.
Here's an example of what the URL might look like before you replace 'YOUR-API-KEY'
with your actual API key:
let url = `https://v6.exchangerate-api.com/v6/YOUR-API-KEY/latest/${fromCurrency.value}`;
Here's an example of what the URL might look like after you replace 'YOUR-API-KEY'
with your actual API key:
let url = `https://v6.exchangerate-api.com/v6/afb0ebb9d423e2a361ce8d20/latest/${fromCurrency.value}`;
It's important to note that the specific steps may vary depending on the API provider. Always refer to the official documentation provided by the API provider for accurate and up-to-date instructions on obtaining and using API keys.
Additionally, remember to keep your API key secure and avoid sharing it publicly in your code or on public platforms. If your API key is compromised, unauthorized access to the API and potential abuse could occur.
Thank You!!!
- Prabhat Sharma