I'm having a hard time trying to make a basic zomato api request work, in reactjs.
The api documentation looks so simple. I'm doing a basic GET request to categories: https://developers.zomato.com/documentation#!/common/categories
And here's how my ReactJS function looks like:
componentDidMount() {
// A previous request for london restaurants
// axios.get('https://developers.zomato.com/api/v2.1/geocode?
lat=51.5138&lon=0.0984')
axios.get('https://developers.zomato.com/api/v2.1/categories')
.then(res => {
console.log(res.data);
this.setState(
{ places: res.data});
});
}
However, I keep getting this response when I hit any api url, in the browser. Or via insomnia.
{
"code": 403,
"status": "Forbidden",
"message": "Invalid API Key"
}
I know it says invalid API. But I've gotten these URLs after loggin in and applying any API key in Zomato's developer portal. Can't find any intructions to figure where I've gone wrong...
Thanks, Reena.