This endpoint requires an app ID and app key from https://developer.nutritionix.com/admin/access_details
POST
https://trackapi.nutritionix.com/v2/natural/nutrients
HEADERS
Content-Type:application/json, x-app-id:NutritionixAppID, x-app-key:NutritionixAppKey
BODY:
{
"query":"for breakfast i ate 2 eggs, bacon, and french toast",
"timezone": "US/Eastern"
}
Notes:
- The end user's timezone parameter is optional, but it should be provided to ensure accuracy in time derivations. For example, if the user says "for breakfast" it will assume 8AM in that user's time zone.
- All consumed_at timetamps are reported back from the API in UTC
I am also getting this error. I tried doing it in curl, here is my curl:
This is my error: {message: Unexpected token ' in JSON at position 0} any help? @mattsilv