BP Struct: API Token Info
| C++ Struct | FAPITokenInfo |
|---|
Stores an API access token and related information
Properties
-
Access TokenStringAccess token used to make authenticated requests (e.g. retrieve user identity info). This is usually obtained via oath.
-
RefreshTokenStringWhen the
Access Tokenexpires, this token can be used to request a new access token without requiring the user to login again. -
ScopesStringThe scopes
Access Tokenis allowed to access. This may differ from the scopes which were requested during authentication. -
TokenLifetimeTimeSpanThe time (in seconds) after
TokenReceivedthat theAccess Tokenis valid. -
TokenReceivedDateTimeThe time (UTC)
Access TokenandRefresh Tokenwere received. This is used to check if theAccess Tokenis still valid before attempting to use it.
Functions
-
Is API Token Valid
Checks if an API token is valid.
This verifies that the
Access Tokenfield is set, and that the token has not yet expired.
Inputs
-
TokenAPI Token InfoThe token to check
Returns
Trueif the token is valid and can be used, otherwise,False. -
-
Has API Token Expired
Checks if an API token has expired.
Compares the current time to the time the token was received + the token's lifetime. Tokens are typically valid for ~30 days.
Inputs
-
TokenAPI Token InfoThe token to check
Returns
Trueif the token is expired and needs to be replaced/refreshed, otherwise,False. -
For any questions, help, suggestions or feature requests, please feel free to contact me at nbpsup@gmail.com