# Connecting LINE login

To let your users sign up with their LINE accounts, you need to register your service with LINE and get a Channel ID and Channel secret.

This page walks you through getting the Channel ID and Channel secret. To enter the two values in WEEGLOO, see [Enter the Channel ID and Channel secret in WEEGLOO](#back-to-weegloo).

## Get the Channel ID and Channel secret from LINE {#get-credentials}

You'll complete the five steps below in the LINE Developers Console. Make sure you're signed in to your LINE account.

::step-overview

::::step{title="Create a Provider" id="create-provider"}
:::note
If you already have a Provider you've been using, you can use it as is instead of creating a new one. In that case, skip this step and go to [Create a LINE Login channel](#create-channel).
:::

1. Open the LINE Developers Console (<https://developers.line.biz/console/>).
2. Click **Create a new provider**.

   ![The LINE Developers Console home screen. There's no Provider yet, and the Create a new provider button is visible](/_img/en-US/manual/service-users/service-login/images/line-01-console-home.webp)

3. In **Provider name**, enter the name of your store or company (for example, `Cozy Closet`).
4. Click **Create**.

   ![The dialog for creating a Provider. The store name is entered in the Provider name field, with the Cancel and Create buttons below](/_img/en-US/manual/service-users/service-login/images/line-02-provider-modal.webp)
::::

::::step{title="Create a LINE Login channel" id="create-channel"}
:::note
If you already have a LINE Login channel you've been using, you can use it as is instead of creating a new one. In that case, skip this step and go to [Register the callback address](#register-callback). However, a channel's service region can't be changed after the channel is created, so first check that the channel's region fits your service.
:::

1. If the screen for choosing a channel type isn't open, go to the **Providers** list in the LINE Developers Console (<https://developers.line.biz/console/>) and click the Provider you'll create the channel in. If that Provider already has channels, then click **Create a new channel**.
2. Among the channel types, click **Create a LINE Login channel**. If the **Create a new channel** dialog is open, click **LINE Login**.

   ![The screen for choosing a channel type, showing four cards: LINE Login, Messaging API, Blockchain Service, and LINE MINI App](/_img/en-US/manual/service-users/service-login/images/line-03-channel-kinds.webp)

3. In **Region to provide the service**, select the region where you'll offer your service.

   :::note{variant="warning" title="You can't change the region after creating the channel"}
   There are only four options, **Japan**, **Thailand**, **Taiwan**, and **Indonesia**, and you can't change your choice once the channel is created.
   :::

4. In **Company or owner's country or region**, select where the business or owner is located.
5. In **Channel name**, enter the name your users will see, in 20 characters or fewer.

   ![The channel creation form. Four regions are lined up under Region to provide the service, and below are the Company or owner's country or region dropdown and the Channel name field](/_img/en-US/manual/service-users/service-login/images/line-04-channel-form.webp)

6. Fill in the rest of the required items on the form (**Channel description**, **Web app** under **App types**, **Email address**, and the checkboxes for agreeing to the terms).

   :::note
   **Require two-factor authentication**, in the same area, is on by default. While it's on, users must confirm a verification code in the LINE app on their smartphone the first time they log in.
   :::

   ![The App types area, showing the Web app and Mobile app options and the Require two-factor authentication toggle](/_img/en-US/manual/service-users/service-login/images/line-05-app-types.webp)

7. Click **Create**.
::::

::::step{title="Register the callback address" id="register-callback"}
1. If the channel screen isn't open, click your Provider in the **Providers** list of the LINE Developers Console (<https://developers.line.biz/console/>). Then click the channel you'll use for login.
2. Click the channel's **LINE Login** tab.
3. Click **Edit** next to **Callback URL**.
4. Paste the address below into the field. Select your *Space* to insert its *Space* ID into the address.

   ```weegloo-redirect-uri
   {
     "template": "https://auth.weegloo.com/v1/spaces/{spaceId}/login/oauth2/code/{provider}",
     "provider": "line"
   }
   ```

   :::note
   If you're not sure which *Space* is yours and you've left the integration to an AI agent, you can also ask the agent. Ask in the chat, "Tell me the callback address to register for LINE login", and you'll get the complete address.
   :::

5. Click **Update**.

   ![The channel's LINE Login tab. Use LINE Login in your web app is on, the Callback URL field holds the WEEGLOO address, and the Update and Cancel buttons are below](/_img/en-US/manual/service-users/service-login/images/line-06-callback.webp)
::::

::::step{title="Apply for email permission" id="request-email"}
Each time a user signs up or logs in with LINE, WEEGLOO needs to receive the user's email address from LINE ([An email on the external account is required to sign up and log in](/manual/service-users/service-login.md#email-required)). LINE sends email addresses only to channels approved for email permission, so if you skip this step, users can neither sign up nor log in.

:::note
To apply, you need a screenshot of the screen on your site where users agree to share their email. If you've left the integration to an AI agent, ask in the chat, "Make the screenshot I need for the LINE email permission application". You can leave building the screen and capturing it to the agent as well. If the screenshot isn't ready yet, you can leave the application screen with **Cancel** and come back later, but once you submit, you can't make changes.
:::

1. If the channel screen isn't open, click your Provider in the **Providers** list of the LINE Developers Console (<https://developers.line.biz/console/>). Then click the channel you'll use for login.
2. Click the channel's **Basic settings** tab.
3. Under **OpenID Connect** near the bottom, click **Apply** next to **Email address permission**.

   ![The OpenID Connect section near the bottom of the Basic settings tab. Email address permission shows Unapplied, with an Apply button next to it](/_img/en-US/manual/service-users/service-login/images/line-09-email-permission.webp)

4. On the application screen that opens below, select the two checkboxes. One confirms that you ask users for consent and tell them how their email is used, and the other confirms that you follow the **LINE User Data Policy**.
5. Under **Screenshot**, upload the screenshot you prepared.
6. Click **Submit**.

   ![The Request for email permission screen. It has the two consent items and the Screenshot upload area, with the Cancel and Submit buttons below](/_img/en-US/manual/service-users/service-login/images/line-10-email-permission-form.webp)

Once your application is approved, the status in the same spot changes to **Applied**.
::::

::::step{title="Copy the Channel ID and Channel secret" id="copy-credentials"}
The Channel ID and Channel secret are on the same **Basic settings** tab.

1. Copy the value shown under **Channel ID**.

   ![The Channel ID on the Basic settings tab, with a copy icon next to the value](/_img/en-US/manual/service-users/service-login/images/line-07-channel-id.webp)

2. Copy the value shown under **Channel secret**.

   ![The Channel secret on the Basic settings tab. The value is shown in full, with a copy icon and an Issue button next to it](/_img/en-US/manual/service-users/service-login/images/line-08-channel-secret.webp)

:::note
The secret is confidential, so don't share it with anyone or write it down anywhere public.
:::
::::

## Enter the Channel ID and Channel secret in WEEGLOO {#back-to-weegloo}

You now have the Channel ID and Channel secret. What you do next depends on how you've been working so far.

If you've been setting things up yourself in Content Studio, follow these steps.

1. Go back to [Turn on social login](/manual/service-users/service-login.md#turn-on-social-login).
2. In **Login Providers**, click the **Enable** button on the **LINE** row.
3. In the **Enter in Weegloo** step, enter the Channel ID in the **Channel ID** field.
4. Enter the Channel secret in the **Channel secret** field.
5. Click the **Save** button below the expanded instructions.
6. If you're turning on *ServiceLogin* for the first time, also click the **Save** button at the very bottom of the form. Clicking this button is what saves your values and turns on *ServiceLogin*.

If you're adding a provider to a *ServiceLogin* that's already on, you only need to click **Save** below the expanded instructions ([Turn on another social login](/manual/service-users/service-login.md#add-a-provider)).

If you've left the integration to an AI agent and it asked you to get the Channel ID and Channel secret, paste both values into the chat as they are and carry on with what you were doing. The agent handles the rest of the setup from there.

## What to do next {#what-to-do-next}

- [Turn on ServiceLogin](/manual/service-users/service-login.md#turn-on-servicelogin): Covers the steps for entering these values in Content Studio and finishing the rest of the member login setup.
- [Service member login](/getting-started/core-concepts/service-users/service-login.md): Covers, with diagrams, what member login is and the flow up to accepting your first members.
- [Create a member role](/manual/service-users/service-user-role.md#create-a-member-role): Covers creating the *ServiceUserRole* that decides what signed-up members can read and write.
- [Auth API](/api/reference/auth-api.md): Covers technical specs, such as request formats, that you need to add login to your site's code.
