06-03-2020 05:13
06-03-2020 05:13
I'm trying to configure our servers to subscribe for updates for users when they connect their account, but am having an issue.
When I make my post request to create the subscription:
curl -X POST\
https://api.fitbit.com/1/user/-/activities/apiSubscriptions/OTgxNjA2MDM4MjEyOTg1MS01NGFiOTVjYjljZDM0MTMwYmE4NjY4YzczMzA4YWRlMw.json\
-H "Authorization: Bearer MY_VALID_BEARER_TOKEN"\
-H "Content-Length: 0"
However, in response to this I am seeing
{
"errors": [{
"errorType": "request",
"fieldName": "500",
"message": "An error occurred with the Fitbit Web API while processing the request. Error id: 024247fffe97ffab-003089e5-0cb18c3c-32ab92f3d6e28d54-446d36ea-10"
}],
"success": false
}
which appears to be an internal server error.
This was working when I tested with my subscription id as test1, so I am concerned that there are some limitations on the subscription id, however can't see this documented. We are using our system user_ids for the subscription-id here so would be a bit of a pain if they are not compatible 😕
Any ideas what's going on here?
Answered! Go to the Best Answer.
Best Answer06-04-2020 18:03
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.
06-04-2020 18:03
Hi @georgegreen,
Welcome to the forums!
This was a good find. I reached out to the team to see if there were any requirements to creating a subscriber id. It looks like subscriber ids have a max character limit of 50 characters, which the example shown exceeds this limit.
I'll file a ticket for our documentation to explicitly state this requirement.
Thanks again, and I hope this helps. Let me know if you have any other questions.
06-04-2020 18:03
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.
06-04-2020 18:03
Hi @georgegreen,
Welcome to the forums!
This was a good find. I reached out to the team to see if there were any requirements to creating a subscriber id. It looks like subscriber ids have a max character limit of 50 characters, which the example shown exceeds this limit.
I'll file a ticket for our documentation to explicitly state this requirement.
Thanks again, and I hope this helps. Let me know if you have any other questions.
06-08-2020 01:48
06-08-2020 01:48
Amazing, thanks for such a speedy and helpful response John!
Best Answer