Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatically get .json files with PHP

I am a Taiwanese university student.
I want to automatically get the .json file regularly and upload to my database by using PHP.

 

Now I can get the .json file by cmd like this:

curl -O -X GET https://api.fitbit.com/1.2/user/-/sleep/date/2018-05-23.json -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI2TEwzTVAiLCJhdWQiOiIyMkNSWTUiLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJzY29wZXMiOiJ3aHIgd251dCB3cHJvIHdzbGUgd3dlaSB3c29jIHdzZXQgd2FjdCB3bG9jIiwiZXhwIjoxNTMxODIzMTczLCJpYXQiOjE1MzE3OTQzNzN9.Y2zkoggK52lqUmxGYm-kP18GuFDSO7rBzT7ixw91JWY"


1. I don't know how to get my token and do the same thing by PHP.

2. Sometimes it will say "Developer information: invalid_request - Missing scope parameter value"

I don't know what it means and how to solve it.

please help me, thank you!

Best Answer
0 Votes
0 REPLIES 0