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

Create new subscription returning 500 error

ANSWERED

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?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

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.

View best answer in original post

Best Answer
2 REPLIES 2

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.

Best Answer

Amazing, thanks for such a speedy and helpful response John!

Best Answer
0 Votes