AccessToken class
An access token used to access the LINE Platform.
Most API calls to the LINE Platform require an access token as evidence of successful authorization. A valid access token is issued after the user grants your app the permissions that your app requests. An access token is bound to permissions (scopes) that define which API endpoints you can access. Choose the permissions for your channel in the LINE Developers site and set them in the login method used in your app.
An access token expires after a certain period. expiresIn specifies the amount of time until the token expires, counting from the moment of issue.
By default, the LINE SDK stores access tokens in a secure place on the device running your app and obtains authorization when you access the LINE Platform through the framework request methods.
Don't try to create an access token yourself. You can get the stored access token with LineSDK.currentAccessToken.
Properties
-
data
→ Map<
String, dynamic> -
Raw data of the response in a
Map
representation.no setter - email → String?
-
The email address set by the user. This value only exists when
idToken
is valid and the user has set the email address in LINE and agreed to share it with you. Both "openid" and "email" scopes are required to get the user email.no setter - expiresIn → num
-
Number of seconds until the access token expires,
counting from when the server issued the token.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
idToken
→ Map<
String, dynamic> ? -
The
Map<String, dynamic>
representation of the received ID Token. This getter converts the receivedidTokenRaw
to a dictionary format if it exists.no setter - idTokenRaw → String?
-
The raw string value of the ID token bound to the access token. It is a Base64 URL encoded string
which follows specification of JSON Web Token (JWT). If you need to access a field value in the
ID Token, use the
idToken
getter.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scopes
→ List<
String> -
The valid scopes bound to this access token.
no setter
- tokenType → String
-
The expected authorization type when this token is used in a request
header. Fixed to
Bearer
for now.no setter - value → String
-
The value of the access token.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited