- Trying LINE Login
- Integrating LINE Login with your web app
- Linking a LINE official account with your LINE Login channel
- Transfer session details to back-end server
Transfer session details to back-end server
This page explains how to securely transfer login session details to a back-end server from a native app that implements LINE Login using the LINE SDK.
Establish login session in native app
After establishing a login session in the native app, get an access token from the LINE Platform and send it to the back-end server.
Execute login in the native app and establish a login session.
Use the LINE SDK to get the logged-in user's access token from the LINE Platform.
Send the access token to the back-end server.
Transfer login session to back-end server
Verify that the access token received by the back-end server is correct.
Receive the access token from the native app.
If verification is successful, the response contains a
client_idproperty (channel ID) and an
expires_inproperty (time until token expires).
expires_inmeet these conditions:
Same as the channel ID of the LINE Login channel linked to the native app
If these conditions are met, you received a usable access token from the native app. Use this access token to call the Social API to get the correct user ID.
Learn how to get the user ID from Get user profile.
If the access token you received can't be verified, don't use that access token.