Closed PabloRNC closed 3 months ago
They update the new method so it gets blocked by Cloudflare, and it should be fixed in 1-2 business days
-- Thanks for the fast reporting
Great. Very appreciated
Great
I have tried and I was thrown an error while executing the login function:
captcha_not_allowed
The captcha is generated correctly as I log the response and it seems to be generated without any problem.
That error only shows up when captcha is not done correctly, especially the captcha solver. or it "just bad luck" sometimes gives that error and try that script again
This is my code. I have tried it in a replit project as now I cannot test if it works locally.
const { Auth } = require("@valapi/auth")
const auth = new Auth();
auth.captcha().then(captcha => {
auth.login({
username: "user",
password: "password",
captcha
}).then(token => {
console.log(token);
})
})
if you use typescript It will show that as an error
please check out the guide
1) https://valapi.github.io/guide/packages/auth/token/captcha.html
you will get captchaResponse
variable here
2) https://valapi.github.io/guide/packages/auth/token/identity.html and put that like this
{
username: "Foo".
password: "Bar",
captcha: captchaResponse
}
Now I have used the right captcha response and a 403 error was shown, meaning I was blocked by Cloudflare. The thing is that then I tried with a random string value and I was still blocked so I will try later.
Now it worked thanks.
Only one more question. Tokens expire, aren't they?
If so how can I refresh them only when there are expired?
This will automatically detect when Token is expired (after first authenticated)
if (!auth.isAuthenticated) {
await auth.reauthorize();
}
or just
await auth.reauthorize();
https://valapi.github.io/guide/packages/auth/token/cookie.html
All right thanks. May I ask about one unofficial endpoint which is not part of your valorant api lib but you might know?
Unofficial
Likey Offical
The thing is that I wanted to know whether I can get a match with an user puuid that is not from my user access token
no. best thing you can do is your friend + don't ask me how
Okey
Hi. I am getting an auth_failure error despite my username and password are correct and I am generating a correct captcha token.
Description
Code
Error
No response
Platform
Windows 11
Node.js Version
20.15.0
@valapi Version
5.0.0-beta.0