1
0
Files
PayPal-PHP-Server-SDK/doc/models/o-auth-token.md
Dani Kirby 6b43a4225b Beta Release 0.5.0 (#3)
* Automated commit message

* Automated commit message

* Automated commit message

* Automated commit message

---------

Co-authored-by: PayPalServerSDKs <server-sdks@paypal.com>
2024-09-09 12:10:34 -05:00

1.5 KiB

O Auth Token

OAuth 2 Authorization endpoint response

Structure

OAuthToken

Fields

Name Type Tags Description Getter Setter
accessToken string Required Access token getAccessToken(): string setAccessToken(string accessToken): void
tokenType string Required Type of access token getTokenType(): string setTokenType(string tokenType): void
expiresIn ?int Optional Time in seconds before the access token expires getExpiresIn(): ?int setExpiresIn(?int expiresIn): void
scope ?string Optional List of scopes granted
This is a space-delimited list of strings.
getScope(): ?string setScope(?string scope): void
expiry ?int Optional Time of token expiry as unix timestamp (UTC) getExpiry(): ?int setExpiry(?int expiry): void
refreshToken ?string Optional Refresh token
Used to get a new access token when it expires.
getRefreshToken(): ?string setRefreshToken(?string refreshToken): void
idToken ?string Optional An ID token response type is of JSON Web Token (JWT) that contains claims about the identity of the authenticated user. getIdToken(): ?string setIdToken(?string idToken): void

Example (as JSON)

{
  "access_token": "access_token4",
  "token_type": "token_type6",
  "expires_in": 74,
  "scope": "scope6",
  "expiry": 88,
  "refresh_token": "refresh_token6",
  "id_token": "id_token6"
}