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?
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.
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 AnswerI 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 at: https://developer.dexcom.com/endpoint-overview
Best Answer