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

Oauth Dexcom in Fitbit Settings App

Hello,

I am trying to authorize my Fitbit settings app using the OAuth feature for Dexcom since they just opened up their API.
Here is what I am trying to do:

<Oauth
title="Login"
label="Dexcom"
authorizeUrl="https://sandbox-api.dexcom.com/v2/oauth2/login"
requestTokenUrl="https://sandbox-api.dexcom.com/v2/oauth2/token"
clientId="tV2Qrqtj2........TJqjDZk9eReLbc8"
clientSecret="0aU7Y.....K0kr9E"
scope="offline_access"
response_type="code"
grant_type="authorization_code"
redirect_uri="https://app-settings.fitbitdevelopercontent.com/simple-redirect.html" onReturn = { async (data) => { console.log("HERE") }} />

But when I attempt it: I get "An Internal Server error occurred, could not process the request".

I don't understand what I am doing wrong, could you give me a little bit of help?

Best Answer
0 Votes
3 REPLIES 3

This appears to be an issue on the OAuth providers side. You'd have to ask the OAuth provider why they're returning 500 error codes during the OAuth flow.

Best Answer
0 Votes

Thank you for your reply. 

 

If instead of using 

<Oauth>

I have had success with using

<Link source="https://sandbox-api.dexcom.com/v2/oauth2/login?client_id=tV2Qrqtj2PhXluCfVTJqjDZk9eReLbc8&redirect_uri=https://app-settings.fitbitdevelopercontent.com/simple-redirect.html&response_type=code&scope=offline_access&state=25" >Link</Link>

But when it redirects, I get "Invalid Callback URL". Do you know how to redirect it back to the companion settings with the data payload? 

 

 

Best Answer
0 Votes

I dont have an answer on the OATH problem, but just making sure you know that all dexcom API glucose data is at least 3 hours behind. So you cant use it for immediate glucose readings. see Data Availability athttps://developer.dexcom.com/endpoint-overview

Best Answer
0 Votes