BP Struct: API Token Info
C++ Struct | FAPITokenInfo |
---|
Stores an API access token and related information
Properties
-
Access Token
String
Access token used to make authenticated requests (e.g. retrieve user identity info). This is usually obtained via oath.
-
RefreshToken
String
When the
Access Token
expires, this token can be used to request a new access token without requiring the user to login again. -
Scopes
String
The scopes
Access Token
is allowed to access. This may differ from the scopes which were requested during authentication. -
TokenLifetime
TimeSpan
The time (in seconds) after
TokenReceived
that theAccess Token
is valid. -
TokenReceived
DateTime
The time (UTC)
Access Token
andRefresh Token
were received. This is used to check if theAccess Token
is still valid before attempting to use it.
Functions
-
Is API Token Valid
Checks if an API token is valid.
This verifies that the
Access Token
field is set, and that the token has not yet expired.
Inputs
-
Token
API Token Info
The token to check
Returns
True
if 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
-
Token
API Token Info
The token to check
Returns
True
if 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