How to Authenticate
note
This page explains how to authenticate your requests to the Intensel API. Please note that the following is just an example of how to pass the API key using headers and should not be run as actual code. For the actual analysis code, please refer to the Physical Risk Tutorial.
To authenticate, you will need to include your API key in the header of your request. The API key should be included in the
header with the key X-Intensel-Api-Key
as shown below:
- Python
- JavaScript
- Curl
import requests
headers = {
'X-Intensel-Api-Key': 'YOUR_API_KEY',
}
response = requests.get('https://api.intensel.net/apiv2/', headers=headers)
const axios = require('axios');
const config = {
headers: { 'X-Intensel-Api-Key': 'YOUR_API_KEY' }
};
axios.get('https://api.intensel.net/apiv1/', config)
.then((response) => {
console.log(response);
}, (error) => {
console.log(error);
});
curl -X GET "https://api.intensel.net/apiv1/" -H "X-Intensel-Api-Key: YOUR_API_KEY"