Connect

Connect LINE Official Account

Changed on

Connect a LINE Official Account with the Channel ID and Channel secret of its Messaging API channel (LINE Official Account Manager > Settings > Messaging API, also shown in the LINE Developers Console under the channel's Basic settings).

Zernio issues a channel access token, reads the bot's profile and sets the channel's webhook URL for you. A channel has one webhook URL, so if it already pointed somewhere else, that integration stops receiving events; the response names it in webhook.previousUrl.

Two settings stay on the customer's side, in LINE Official Account Manager > Settings > Response settings. nextSteps in the response lists them:

  • Turn on Webhooks. Until it is on, LINE delivers nothing to Zernio.
  • Turn off auto-response and greeting messages.

Reconnecting the same channel on the same profile updates the existing account. To get your userId for the state parameter, call GET /v1/users which includes a currentUserId field.

post/v1/connect/line/credentials

Request

Request body

channelIdstring required

The Messaging API channel's Channel ID (digits only).

channelSecretstring required

The Messaging API channel's Channel secret (32 hex characters).

statestring required

Required state formatted as {userId}-{profileId}. Get userId from GET /v1/users and profileId from GET /v1/profiles.

redirect_urlstring uri

Optional URL to redirect to after a successful connection.

Example request

{
  "state": "6507a1b2c3d4e5f6a7b8c9d0-6507a1b2c3d4e5f6a7b8c9d1"
}

Response

LINE connected

messagestring
nextStepsstring[]

Settings the account owner still has to change in LINE Official Account Manager, led by a warning when webhook.previousUrl is set.

redirectUrlstring

Changes