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

API update required #68

Closed
ViRb3 opened this issue Feb 18, 2021 · 13 comments
Closed

API update required #68

ViRb3 opened this issue Feb 18, 2021 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@ViRb3
Copy link
Owner

ViRb3 commented Feb 18, 2021

As clear from #64 and #67, the API has changed, and some people are getting rate limited. I will do my best to investigate and release an update before the weekend.

@ViRb3 ViRb3 added the bug Something isn't working label Feb 18, 2021
@ViRb3 ViRb3 self-assigned this Feb 18, 2021
@ViRb3 ViRb3 pinned this issue Feb 18, 2021
@zkanda
Copy link

zkanda commented Feb 20, 2021

Any update here? Would love to help if I can.

@ViRb3
Copy link
Owner Author

ViRb3 commented Feb 20, 2021

Finishing another project by the end of today and then starting this. Will keep you updated.

@ViRb3
Copy link
Owner Author

ViRb3 commented Feb 21, 2021

I took a quick look at the situation. The API version has been bumped, but the endpoints and paths haven't changed the slightest. I tested the current latest version of wgcf locally: registration and generation work perfectly, no rate limits or other problems. Nevertheless, I will push an update with the new API endpoints and some other refinements tomorrow. If that still doesn't help, perhaps I will add a customizable delay between requests for those getting rate limited.

@ViRb3
Copy link
Owner Author

ViRb3 commented Feb 22, 2021

Well, here we are - I vastly overhauled the API generation, cleaned up a lot of code, and fixed some minor reported issues. We are now at the latest API version.

Throughout the entire development process, which includes running dozens of API call tests without delay, I did not get a single rate limit issue. Just as I was about to publish, running my final tests, I finally got rate limited: 429 Too Many Requests. I did abuse the API to get here, though: I was running a significant amount of tests. It seems like this is an IP rate limit, since even the original 1.1.1.1 app on my phone can't connect to the API.

That being said, no user should ever encounter this rate limit with regular usage. My guess is that this system is put in place to prevent mass registrations for free WARP+ quota abuse, and I fully support that. DO NOT risk this project's existence by abusing it for such purposes. Be nice and pay for WARP+ if you need it.

I will go ahead and publish this release, please test it out. If you do get rate limited, please refer to #70. I am happy to add a delay between the API requests, but I don't currently know if that will help.

@ViRb3 ViRb3 closed this as completed Feb 22, 2021
@ViRb3 ViRb3 changed the title API update required, wgcf broken API update required Feb 22, 2021
@ViRb3 ViRb3 unpinned this issue Feb 22, 2021
@pverghese
Copy link

2021/02/22 15:23:15 Using config file: wgcf-account.toml
2021/02/22 15:23:16 Updated license key detected, re-binding device to new account
2021/02/22 15:23:18 400 Bad Request

Getting this error, when trying to use my warp unlimited key

@ViRb3 ViRb3 reopened this Feb 22, 2021
@ViRb3
Copy link
Owner Author

ViRb3 commented Feb 22, 2021

From @Pisswine:

hey m'dude, I constantly get error 400 bad request when trying to use my premium license key, Works on mobile and ...
I'd appreciate help on this, cheers

@ViRb3
Copy link
Owner Author

ViRb3 commented Feb 22, 2021

I'm looking into this.

@ViRb3
Copy link
Owner Author

ViRb3 commented Feb 23, 2021

@pverghese @Pisswine what exactly are you doing when you get the 400 bad request error? I just tried the following sequence and it worked without issues:

  1. wgcf register
  2. rename wgcf-profile.toml to wgcf-profile2.toml
  3. wgcf register
  4. copy license_key from wgcf-profile2.toml and replace in wgcf-profile.toml
  5. wgcf update

Are you sure you copied the key correctly?

@pverghese
Copy link

@pverghese @Pisswine what exactly are you doing when you get the 400 bad request error? I just tried the following sequence and it worked without issues:

  1. wgcf register
  2. rename wgcf-profile.toml to wgcf-profile2.toml
  3. wgcf register
  4. copy license_key from wgcf-profile2.toml and replace in wgcf-profile.toml
  5. wgcf update

Are you sure you copied the key correctly?

I'm assuming the license key has to be pasted into wgcf-account.toml not wgcf-profile.toml

So Steps I have taken

  1. wgcf register
  2. wgcf generate
  3. Copy license key from my warp premium account into wgcf-account.toml
  4. wgcf update
    I get the 400 Bad request when I run the update command

@ViRb3
Copy link
Owner Author

ViRb3 commented Feb 25, 2021

@pverghese Yes, sorry, I meant wgcf-account.toml, not wgcf-profile.toml. Can you please try the exact steps that I wrote in my previous comment and let me know if it works, just so we know if the problem is with the key specifically or something else?

@pverghese
Copy link

@pverghese Yes, sorry, I meant wgcf-account.toml, not wgcf-profile.toml. Can you please try the exact steps that I wrote in my previous comment and let me know if it works, just so we know if the problem is with the key specifically or something else?

I redid your steps. The license key rebinding works with the free account. It doesn't work when I use the license key from my warp premium account.

@pverghese
Copy link

@pverghese Yes, sorry, I meant wgcf-account.toml, not wgcf-profile.toml. Can you please try the exact steps that I wrote in my previous comment and let me know if it works, just so we know if the problem is with the key specifically or something else?

I redid your steps. The license key rebinding works with the free account. It doesn't work when I use the license key from my warp premium account.

I figured out the issue. Warp premium has a maximum of 5 devices linked to the account. I was already running at the maximum. So after I deleted a device, the linking with the premium account worked.

Thanks

@ViRb3
Copy link
Owner Author

ViRb3 commented Feb 26, 2021

@pverghese Thanks a lot for testing and figuring this out. I have created an issue to track the non-helpful error message here: #76. @Pisswine please read above to fix your error.

@ViRb3 ViRb3 closed this as completed Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants