1. Documents
  2. iOS SDK

API reference for the LINE SDK for iOS

Your application can fetch LINE users’ profile data and friend lists with the LINE SDK for iOS. With the LINE SDK for iOS versions 3 or higher, you can use certain APIs directly without accessing your server. This means you can use APIs without having to worry about access tokens because the SDK takes care of it automatically.

Getting access tokens

Certain APIs cannot be used via the LINE SDK for iOS. These APIs must be called from a registered server and require an access token. To use these APIs from your server, the access token must be transferred from the SDK to your server.

Access token information can be retrieved from the LineApiClient instance immediately after the authentication and authorization process. The example below shows how access tokens are retrieved.

After retrieving an access tokens, you will be able to use REST APIs from your server. Refer to REST APIs for more info.


- (void)lineAdapterAuthorizationDidChange:(NSNotification*)aNotification
    LineAdapter *_adapter = [aNotification object];
    if ([_adapter isAuthorized])
        LineApiClient *apiClient = [mAdapter getLineApiClient];
        NSString *accessToken = apiClient.accessToken;
        NSString *refreshToken = apiClient.refreshToken;
        // The above information will be sent to the backend server and processed accordingly.

Getting user profiles

The Profile API lets you retrieve user profiles.


  • Access token with PROFILE permission issued.


The Profile API provides the following object which contains the user’s profile.

Property name Description
displayName User’s nickname.
mid Identifier of user who is logged in.
picture User’s profile image URL.
statusMessage User’s status message. Not included in the object if the user has not created a status message.




[[mAdapter getLineApiClient] getMyProfileWithResultBlock:^(NSDictionary *aResult, NSError *aError)
    if (aResult)
        NSString *displayName = aResult[@"displayName"];
        NSString *mid = aResult[@"id"];
        NSString *pictureUrl = aResult[@"pictureUrl"];
        NSString *statusMessage = aResult[@"statusMessage"];
        // do something...
        NSLog(@"%@", aError);
        // do something for error...

Profile image thumbnails

You can retrieve the URL of a user’s profile image via certain APIs. You can resize the image by adding a suffix. The LINE platform supports the following image sizes and suffixes:

Image size Suffix
200 x 200 /large
51 x 51 /small

You can retrieve the large image with the following URL: