07-17-2018 20:06 - edited 07-17-2018 20:12
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-17-2018 20:06 - edited 07-17-2018 20:12
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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!
