# Managing users

This topic explains how to manage users who have logged in through the LINE Login API.

# Getting user profiles

You can get profile information for users who have been identified by an access token. Profile information includes a user's ID, display name, profile image, and status message.

Check your access token's scope

You need an access token with the profile scope to get a user's profile information. To learn more, see Authenticating users and making authorization requests and Scopes.

Example request:

curl -v -X GET https://api.line.me/v2/profile \
-H 'Authorization: Bearer {access token}'

Example response:

{
  "userId":"U4af4980629...",
  "displayName":"Brown",
  "pictureUrl":"https://profile.line-scdn.net/abcdefghijklmn",
  "statusMessage":"Hello, LINE!"
}

To learn more, see Get user profile in the LINE Login v2.1 API reference.

Identifying users for a service

Identify users by their user IDs. User IDs can't be changed.

Users can set a new display name, profile image, and status message at any time.

You can't identify users with this information.

Identifying users with ID tokens

You can get a user's profile information and email address using the ID token that you obtain along with their access token.

To learn more, see Verify ID token in the LINE Login v2.1 API reference.

# Logging out users

To create a better user experience, we recommend providing a way for users to log out of your app.

When a user has logged out of your app, revoke their access token and delete all the user data in your app.

Example request to revoke an access token:

curl -v -X POST 'https://api.line.me/oauth2/v2.1/revoke' \
-H "Content-Type:application/x-www-form-urlencoded" \
-d "client_id={channel id}&client_secret={channel secret}&access_token={access token}"

To learn more, see Revoke access tokens in the LINE Login v2.1 API reference.