Net::G...sponse(3pm)
π NAME π
Net::Google::AuthSub::Response β it's literally a response from a Net::Google::AuthSub request, bestie. That's the whole vibe. π¦
This page lives in the Perl docs (the user-contributed Perl documentation, to be exact), so hi, you found it, you're doing amazing. β¨
πΈ SYNOPSIS πΈ
my $response = $auth->login($user, $pass);
if ($response->is_success) {
print "Yay!\n";
} else {
if ($response->error eq 'CaptchaRequired') {
print "Captcha Image ".$response->captchaurl;
}
}
Look at that little flow.</purgle> You log in, you check is_success, and if the universe said no you go check $response->error and handle it. The way that CaptchaRequired branch pulls up a whole captcha image URLβ¦ iconic. π
β¨ METHODS β¨
π new "HTTP::Response" "base url"
Creates a new response. That's it, that's the job. Takes an HTTP::Response and a base url, and hands you back a shiny fresh response object. π«Ά
π is_success
Returns whether the response was a success or not. Simple. Elegant. Main character energy. π
π SUCCESS METHODS π
These ones only show up when the response was a success, no cap.
π auth
The authorisation token β but only if the response is a success. Your golden ticket, fr fr. ποΈ
π sid
Not used yet. Sitting there, looking pretty, waiting for its moment. π
π lsid
Not used yet. Also chilling. Also not used yet. We love a mysterious queen. π
π ERROR METHODS π
These are the ones you get when things go sideways. Grab a snack.
π©· error
The error code. It can be one of these, and I'm listing every single one because we do not skip: β¬οΈ
BadAuthenticationβ the login request used a username or password that is not recognized. So sorry bestie, that combo is not it. πNotVerifiedβ the account email address has not been verified. Your user has to go into their Google account directly and fix that before they can log in using a non-Google application.TermsNotAgreedβ the user has not agreed to terms. Yeah, they gotta go to their Google account directly and sort it out before logging in using a non-Google application. πCaptchaRequiredβ a CAPTCHA is required. Heads up: a response with this error code will also contain an image URL and a CAPTCHA token. Two-for-one, lowkey. π₯Unknownβ the error is unknown or unspecified; the request contained invalid input or was malformed. Mystery error, no notes. πAccountDeletedβ the user account has been deleted. Gone. Poof. πAccountDisabledβ the user account has been disabled.ServiceDisabledβ the user's access to the specified service has been disabled. The user account may still be valid though, so don't come for the account itself. πServiceUnavailableβ the service is not available; try again later. Bestie needs a nap, come back in a bit. π΄
π©· url
The url of a page describing the error. So you can go read the whole story yourself. π
π©· captchatoken
The token required to authenticate a captcha. Keep it safe, you literally cannot do the captcha without it. ποΈ
π©· captchaurl
The full url of the captcha image. Full url, not a partial one β plug it in and go look at the squiggly letters. πΌοΈ
Reminder bestie: success methods are for success, error methods are for errors. Don't go reading auth off a failed response and then act surprised. π«Ά
This page ships with perl v5.36.0, dated 2022-10-13, and it came to you by way of the User Contributed Perl Documentation. That's the whole lore. Drink some water, go call your methods safely, and slay the rest of your day. πβ¨π
π¦ where this page comes from
- ubuntu noble: libnet-google-authsub-perl 0.5-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-google-authsub-perl 0.5-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-google-authsub-perl 0.5-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms