# Getting user profiles

Once the user logs in to your app using LINE Login and you have retrieved an access token, you can call the Social API to get the user’s LINE profile information. You can get the user’s user ID, display name, profile media URL, and status message.

# Before you begin

To call the Social API, you must have an access token retrieved through the authentication and authorization process. See the following pages for more information.

# Getting user profiles

To get a user’s profile information, send an HTTP GET request to the /profile endpoint with the access token in the request header.

GET https://api.line.me/v2/profile

# Request header

Header Description
Authorization Bearer {access token}

Example request

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

# Response

If successful, a JSON response is returned with the user ID, display name, profile image URL, and status message. The profile image URL and status message are not returned if they have not been set by the user.

  "statusMessage":"Hello, LINE!"

# Status codes

The following HTTP status codes are returned when an HTTP request is sent.

HTTP status Description
200 OK Request successful
400 Bad Request Problem with the request. Check the request parameters and JSON format.
401 Unauthorized Check that the authorization header is correct.
403 Forbidden Not authorized to use the API. Confirm that your account or plan is authorized to use the API.
429 Too Many Requests Make sure that you are within the rate limit for requests.
500 Internal Server Error Temporary error on the API server.

For more information on the Social API, see the following pages.