Comments (7)
Haven't looked at this in a while since they added the sync directly to the app. It looks like they may have changed the website, I'll take a look as soon as I have a chance tomorrow.
from ifitsync.
It looks the same to me. Can you go to https://www.ifit.com/settings/apps
And right click-> view source
Then search for "clientid" ? There should be a few entries joined by a "clientsecret". The script is basically trying to scrape these values. It's possible that since you are signing in with Google credentials that the scrape is failing. After that, all the interactions are with the API directly, just not sure how that will react with Google credentials as well...
from ifitsync.
Thanks for getting back quickly. I overlooked adding an app in my profile. Got it working now, thanks again.
from ifitsync.
Glad it worked out!
from ifitsync.
It looks the same to me. Can you go to https://www.ifit.com/settings/apps And right click-> view source Then search for "clientid" ? There should be a few entries joined by a "clientsecret". The script is basically trying to scrape these values. It's possible that since you are signing in with Google credentials that the scrape is failing. After that, all the interactions are with the API directly, just not sure how that will react with Google credentials as well...
Hey I don't suppose you have had issues with the ifit API being unauthorized using this method of authentication?
I am getting the following response when trying to authenticate
{ code: 'UnauthorizedError', message: 'Unauthorized' }
I feel like they have changed their API recently, and the clientID / Secret no longer is working for me.
For reference, this is my authentication post, written as a fetch in TS.
const res: iFitAuthResponse = await fetch(
'https://api.ifit.com/oauth/token',
{
method: 'POST',
body: JSON.stringify({
grant_type: 'refresh_token',
refresh_token: credentials['refresh_token'],
client_id: process.env.IFIT_CLIENT_ID,
client_secret: process.env.IFIT_CLIENT_SECRET,
}),
headers: {
Host: 'api.ifit.com',
Connection: 'keep-alive',
Origin: 'https://onboarding-webview.ifit.com',
'User-Agent':
'Mozilla/5.0 (Linux; Android 6.0; Google Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.186 Safari/537.36',
'content-type': 'application/json',
Accept: '*/*',
Referer:
'https://onboarding-webview.ifit.com/0.27.0/index.html?page=login-email',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'en-US,en;q=0.9',
'X-Requested-With': 'com.ifit.wolf',
},
}
).then((x) => x.json());
Do you happen to know if there are any additional / changed headers needed to auth now?
from ifitsync.
I haven't had any issues getting refresh tokens but I haven't tried to "re-authenticate" in a very long time. My script has been working for me without issues.
from ifitsync.
Thanks for letting me know, I'll investigate further a d post a solution if I find one 👍
from ifitsync.
Related Issues (10)
- last_run_time.json HOT 4
- IndexError: list index out of range HOT 6
- Docker Documentation HOT 2
- Token expiration HOT 30
- Google Fit changes required scopes for HR HOT 1
- Upload to Google Fit not including Steps / Heart Points HOT 3
- iFit Data Question HOT 5
- Changes to use with NordicTrack bike? HOT 15
- IndexError: list index out of range HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ifitsync.