LineDevelopers

Read a widget's public configuration

GET/api/channels/webchat/session

Returns the presentation settings for a widget so you can render the launcher before anyone starts a conversation. No session is created.

Widget public key, from an authorised domain

Parameters

keystringqueryrequired

The widget's public key.

greetingstringquery

Send 1 to also return the opening greeting and the assistant name. The widget uses this when it opens itself, so it can show the greeting before a session exists.

One of: 1

Originstring · uriheaderrequired

Must match one of the widget's allowed domains.

Responses

200The widget's public configuration.
400The key parameter is missing.
403The Origin is not on the widget's allowed-domains list.
404No enabled widget matches that key.
curl -X GET 'https://useline.io/api/channels/webchat/session?key=pk_live_2f8c' \
  -H 'Origin: https://example.com'