09-30-2015 11:19
09-30-2015 11:19
I'm struggling successfully hitting the DELETE Food Log service from my PHP application using Curl. From what I'm reading, my request is accurately constructing with setting the curl option CURLOPT_CUSTOMREQUEST = 'DELETE'. I'm also using a FitBit user-id that can already get and post food logs.
Here's what I'm returning from the API request:
Array ( [errors] => Array ( [0] => Array ( [errorType] => not_found [fieldName] => n/a [message] => The API you are requesting could not be found. ) ) [success] => )
Has anyone else had trouble deleting from PHP?
Answered! Go to the Best Answer.
09-30-2015 14:04
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
09-30-2015 14:04
It should be DELETE https://api.fitbit.com/1/user/-/foods/log/food-log-id-here.json . This was incorrectly transferred from our old wiki documentation. I will fix it. Apologies for the error.
Best Answer09-30-2015 12:53
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
09-30-2015 12:53
Can you please tell us what the URL is that your application is requesting?
Best Answer09-30-2015 13:17
09-30-2015 13:17
Jeremiah,
I'm trying to request:
DELETE /1/user/[user-id]/food/[food-log-id].json
/1/user/xxxxx/food/xxxxxxxx.json
Would it help if I gave you the exact URL?
Best Answer09-30-2015 14:04
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
09-30-2015 14:04
It should be DELETE https://api.fitbit.com/1/user/-/foods/log/food-log-id-here.json . This was incorrectly transferred from our old wiki documentation. I will fix it. Apologies for the error.
Best Answer09-30-2015 14:50
09-30-2015 14:50
Thanks Jeremiah
Best Answer