Hello, so I am trying to create a meal plan web app where users can generate their meal plan. Using spoonacular’s API. I was able to set up some of the calls I need on Bubble, such as connecting users with spoonacular
However, I have been unsuccessful in trying to set up additional calls because they require a variable path for the user at the endpoint. I keep getting ‘‘you’re not authorised’’ error response when I initialize the call. I’ll be glad if I can get a way around this block
Are you going through the Authentication process?
You have to put an API key in the request URL for every request you make,
for example ?apiKey=YOUR-API-KEY.
Alternatively, you can put the API key in the request header as x-api-key .
Well, of course! You are trying to use the username and hash from the example. But you do not have rights for this user.
Read this carefully:
Connect user:
After connecting, you will receive the necessary data for further work:
{
“status”: “success”,
“username”: “user-1”,
“spoonacularPassword”: “colawithxxxx”,
“hash”: “d8e37a0a0a0558417edc1a9aa80368bXXXXXXXX”
}
Add a Meal-Plan-Template for it:
And continue down the list from the “Working with the Meal Planner” guide.