Early adopter offerSubscribe to a paid plan by March 31, 2027 and get 50% off the base fee for 3 months50% off paid plans for 3 monthsD-156Learn more
API integration

Widget JavaScript API

Control an installed widget through the window.Cliptalk object.

#CliptalkSettings

A settings object defined before the widget script.

PropertyTypeDescription
userobjectSigned-in customer { id, name, email, phone, hash }
localestringForce the widget language (ko, en, ja, zh-TW, zh-CN)
window.CliptalkSettings = {
  user: { id: 'user_1001', name: 'Alex Kim', email: 'clip@example.com' },
  locale: 'en'
};

#Cliptalk.identify(user)

JSCliptalk.identify(user | null)

Updates the customer on sign-in and sign-out. It applies the next time the chat opens. Pass null to return to a guest.

window.Cliptalk.identify({ id: 'user_1001', name: 'Alex Kim' });
window.Cliptalk.identify(null); // sign out

#Cliptalk.setLocale(lang)

JSCliptalk.setLocale(lang)

Changes the widget language. null returns to automatic detection.

window.Cliptalk.setLocale('ja');

#Cliptalk.open() / close()

JSCliptalk.open() · Cliptalk.close()

Opens or closes the chat. Wire it to a button on your site, such as “Contact us”.

<button onclick="window.Cliptalk && Cliptalk.open()">
  Chat with us
</button>