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

How do I move away from using localhost to make my API calls?

ANSWERED

Hi all,

 

I work for a research support office at a hospital and we are working to integrate Fitbit with our data platform so that study teams can get up to date data from participants on a daily basis. We’ve made considerable progress in generating an R script for a proof of concept project. Our script is able to make a call to Fitbit’s API, manipulate the data received from the call, and commit the data to via our data platform's API. However, our script is still using https://localhost/ as the redirect URI, and my background is not in web application or software development, so I'm not sure where to go from here. 

 

Specifically, these are my questions:

1. How do people set up redirect URIs? Do we need to set up a HTTPS web server such as Apache to host our application?

2. Once we set up our redirect URI, how do we get our initial authorizations to a state where users can interact with it? We would like users to have some kind of browser link they can access so they can authorize us to grab their data.

 

If anyone has any pointers or can even get provide a broad overview of what the next steps would look like, I'd be super appreciative. 

 

Thanks!

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi @yeamank 

 

I think a lot of people are using a web server of some sort to host their application.  Once you have your application running, you'll need to define an endpoint that you'll use to redirect the user to.  This endpoint should read the authorization code from the redirect URL and exchange it for the access token and refresh token.

 

The authorization URL can be entered into your browser as it to receive consent from your population.   I've seen people host the URL on their website, send it in an email, or include it in an online document as part of the research studies consent package.  

 

Does this help?

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
2 REPLIES 2

Hi @yeamank 

 

I think a lot of people are using a web server of some sort to host their application.  Once you have your application running, you'll need to define an endpoint that you'll use to redirect the user to.  This endpoint should read the authorization code from the redirect URL and exchange it for the access token and refresh token.

 

The authorization URL can be entered into your browser as it to receive consent from your population.   I've seen people host the URL on their website, send it in an email, or include it in an online document as part of the research studies consent package.  

 

Does this help?

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer

Yes, this is super helpful, thank you! I suspected I would need to set up something like that, but I was unsure given my background isn't in software or computer engineering. Thanks so much for your prompt response.

Best Answer
0 Votes