I logged in successfully with auth0 using social login with Fitbit , but now I need to call fitbit api and its asking me for brearer access token , I got access token and id token from auth0 and tried in fitbit web api but fitbit api not working and giving error like invalide token.
How can I get fitbit access token from auth0 ?
I am developing android app and using WebAuthProvider for fitbit login.
I guess as you say you have id and access token and still receiving an error I would reach out to Fitbit Community Forum or open a support request to ask them where the issue is coming from in their platform.
I would really love to help you but we are not supposed to be recommending anything in terms of stack that we donāt have expertise on (here Fitbit API). We actually donāt kno where the issue is coming from. Can you share any screenshots, error logs etc?
{āsuccessā:false,āerrorsā:[{āerrorTypeā:āinvalid_tokenā,āmessageā:āAccess token invalid: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5jVTB3NUQtZ2o1WVN3VjVQNWpabSJ9.eyJuaWNrbmFtZSI6InNhbmpheSBtLiIsIm5hbWUiOiJzYW5qYXkgbS4iLCJwaWN0dXJlIjoiaHR0cHM6Ly9zdGF0aWMwLmZpdGJpdC5jb20vaW1hZ2VzL3Byb2ZpbGUvZGVmYXVsdFByb2ZpbGVfMTAwLnBuZyIsImdlbmRlciI6Ik1BTEUiLCJsb2NhbGUiOiJlbi1JTiIsInVwZGF0ZWRfYXQiOiIyMDIwLTA4LTAzVDEyOjM0OjIzLjg1OVoiLCJpc3MiOiJodHRwczovL2Rldi01Mnpsbzgzdi51cy5hdXRoMC5jb20vIiwic3ViIjoiZml0Yml0fDhRM1JESyIsImF1ZCI6InEzdkRXamMxY1IydXlsTEczMFNTektwYldGRlVyazJoIiwiaWF0IjoxNTk2NTQwMzYzLCJleHAiOjE1OTY1NzYzNjMsIm5vbmNlIjoiUDlvVXZqTXU1bDhiMjlfM2JmeVBRODhqTENCT2dSTjFZY09MWHktXzNrYyJ9.nvCO5NhhwM8WuOsm75R3H7aDxJzXkfeH5nVWM5s0kx6olXQN4OHWRqQC6ZEPvjNF7Hk1eqL3J0RSPNe2qC5qqH1Uzgy95GnDqDwjQtnBSGSTopYB1mM9EAwiZgflnc-eJ2Zkhc1A3zhmKgzNfzfBuDpP6LRbrkO93n5Ad-j7RCYQyDbKIoRGhI8adUpX2lsmTE9Omv7RMg2ehJhYI6r4VBl-RWqL31jklOam1ZNt8Q-P5puXCVK16hN1ZtDIBNuGEWvVPf4g4Plp7GXWBNYQc_ShIZgMNROsmXpBhraDSYNS-XhUAbveZ0qiYLu2uCVXVX_s9bQnTRORG4P1fQMk8g. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process.ā}]}
I know this thread is quite old, but I think the issue is that you need to use the identity provider access_token provided by Fitbit rather than the Auth0 access_token for your app.
As a note, itās quite difficult to come across that page in the Auth0 docs. The article which explains how to connect an app to Fitbit makes no mention of actually calling the Fitbit API from a connected app.
Donāt know if this is the right place to make suggestions, but if any Auth0 people read this, it would be really useful to have the āCall an Identity Provider APIā page linked in the āNext Stepsā section of articles which explain how to set up social connections.