Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 Forbidden & Cloudfare 1020 #86

Closed
Likenttt opened this issue Jan 19, 2022 · 1 comment
Closed

403 Forbidden & Cloudfare 1020 #86

Likenttt opened this issue Jan 19, 2022 · 1 comment

Comments

@Likenttt
Copy link

Hello, recently I ported this lib to js based on another existed js lib. However I got stuck in login. Here is my repo: https://github.com/Likenttt/garmin-connect-api-js

I use axios to request the garmin sites and cookiejar to maintain credentials between requests. But I always get 403 and 1020.

When logining, I do the processes below.

  1. Get sso.garmin.com/sso/login as a html text
  2. Use a regular expression to search the csrf token from text in 1 and add the csrf token as _csrf kv in data posted later
  3. Post and retrieve the response as html
  4. Use a regular expression to search the auth_ticket from 3
  5. Get the auth_ticket url(claim the ticket)
  6. Get connect.garmin.com/modern to finish the login ceremony.

You can see this thread to check my effort.
Pythe1337N/garmin-connect#26

Any idea will be appreciated.

@petergardfjall
Copy link
Owner

Sorry, I cannot elaborate on this more than what's already in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants