YouTubePHP Documentation

OAuthException extends RuntimeException
in package

FinalYes

Google's OAuth server refused a request.

getError() is the OAuth error code, which says what to do next: authorization_pending and slow_down while a device sign-in waits for its user, access_denied when they declined it, expired_token when they took too long, and invalid_grant when a refresh token has been revoked or has expired.

Tags
link
https://developers.google.com/identity/protocols/oauth2/limited-input-device#step-6:-handle-responses-to-polling-requests
since
1.0.0
author

Valithor Obsidion valithor@valgorithms.com

Table of Contents

Properties

$description  : string
$error  : string

Methods

__construct()  : mixed
getDescription()  : string
getError()  : string
The OAuth error code, e.g. `invalid_grant`.
getStatus()  : int
The HTTP status, or 0 when there was no response.
isInvalidGrant()  : bool
The refresh token no longer works: someone must sign in again.

Properties

Methods

__construct()

public __construct(string $error[, string $description = '' ][, int $status = 0 ][, ?Throwable $previous = null ]) : mixed
Parameters
$error : string

The OAuth error code, e.g. invalid_grant.

$description : string = ''

Google's explanation, when it gave one.

$status : int = 0

The HTTP status, or 0 when there was no response.

$previous : ?Throwable = null

getDescription()

public getDescription() : string
Return values
string

getError()

The OAuth error code, e.g. `invalid_grant`.

public getError() : string
Return values
string

getStatus()

The HTTP status, or 0 when there was no response.

public getStatus() : int
Return values
int

isInvalidGrant()

The refresh token no longer works: someone must sign in again.

public isInvalidGrant() : bool
Return values
bool
On this page

Search results