User consent

Users must provide consent before your bot (LINE@ account or official account) can be added as a friend and access user profile information which includes a display name, profile image, status message, and user ID. Users give consent to bot applications by agreeing to the Official Accounts Terms of Use.

When LINE users add an official account or LINE@ account as a friend or invite an account to a chat for the first time, they will see the Official Accounts Terms of Use screen. Once users have agreed to the Official Accounts Terms of Use, they no longer have to provide consent individually to subsequent official accounts or LINE@ accounts that they add as friends or interact with in a chat.

Official Accounts Terms of Use

If a user has already agreed to the Official Accounts Terms of Use when adding your bot as a friend, no consent screen is displayed and your bot will automatically be able to get the user’s profile information. If the user has not agreed to the Official Accounts Terms of Use, the consent screen is displayed and the user must agree before adding your bot as a friend.

Users using LINE version 7.5.0 or below

Users who are using a version of the LINE app below 7.5.0 must agree to a consent screen for every bot that they add as a friend or invite to a chat. By default, the consent screen asks for the user’s permission to get the user’s profile information (display name, profile image, status message, and user ID).

User consent screen for bot

Data returned in group chats

Unlike users who have agreed to the Official Accounts Terms of Use, when a user using LINE version 7.5.0 or below sends your bot a message in a group chat (group or room), the user ID is not returned in the source object of the webhook event.

The following is an example of a source object (group) sent for a user who is using a version of LINE below 7.5.0.

{
  "source": {
    "type": "group",
    "groupId": "Ca56f94637cc4347f90a25382909b24b9"
  },
}

The following is an example of a source object (group) sent for a user who is using LINE version 7.5.0 or higher and has agreed to the Official Accounts Terms of Use.

{
  "source": {
    "type": "group",
    "groupId": "Ca56f94637cc4347f90a25382909b24b9",
    "userId": "U206d25c2ea6bd87c17655609a1c37cb8"
  },
}

For more information, see source group and source room.