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.
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.
We do see the 2 requests in the IIS logs, but the endpoint is still not being verified. We use a proxy server and redirect to the server we want.
Both are GET request and one is a 204 and the other is a 404. The verification code for the 204 matches up with what is on the FitBit site.
Best AnswerDid you ever resolve this? I'm experiencing the same:
the endpoint is getting called with the ?verify=... parameter value. I send 402 for the wrong one, 202 for the right one but it still doesn't work.
So:
The subscriber still isn't being validated. Any thoughts?
I'm running the project locally in Visual Studio and I am using ngrok to make it reachable from outside the network. I see the calls being received and my logging shows I'm reacting right so I'm getting clueless right now..
Thanks in advance,
Edwin
Best Answer
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.
Hi @eekayonline. Instead of responding with a 202 and 402, try 204 and 404.
https://dev.fitbit.com/build/reference/web-api/subscriptions/#verify-a-subscriber
Best AnswerThanks for getting back at me.. the 202 402 were a typo (thankfully).
But I managed to get this going...
As it appears my function - written in C# for a .net Core API - that receives the ?verify=xxx parameter returned a HttpActionResult for which I'd set the status code to 404 or 204. The HTTP response was 200 OK which isn't as specified.
I changed the function result into an IActionResult and returned NotFound() and NoContent().. The result was then the right HTTP response.
I found this out using ngrok's web interface which showed me the 200 OK in big letters...
Thanks for getting back to me this fast, anyway! 🙌🏻
Best Answer