Санҷиши ҳаққоният
Kaliti API-ро ҳамчун рамзи доранда (bearer token) фиристед. Калит бояд дорои иҷозати livechat.manage бошад; калиди бидуни он бо хатои 403 рад карда мешавад, на 404.
Ҷое, ки рақами мушаххаси ташкилоти шумо ҷойгир аст
Ин нуқтаи поёнӣ org_id -ро ҳамчун майдон дар бадани JSON мегирад.
Rakami муайянкунандаи ташкилоти шумо дар экрани калидҳои API дар панели идоракунии шумо, дар паҳлӯи худи калид ҷойгир аст. Ин як раками муайянкунанда дар ҳар یک дархосте, ки шумо иҷро мекунед, якхела аст.
Санҷидан
Ҳар чизро дар қаavски кунҷӣ бо қиматҳои худ ва ҷойи нигоҳдорандаи калидро бо калима аз панели идоракунии худ иваз кунед.
curl -X POST https://api.zinndigital.com/v1/chat/widgets \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string> }'Воarid шудаед? Консоли API дар панели идоракунии шумо рақами мушаххаси ташкилоти воқеӣ ва калиди худро пур мекунад ва дархостро бар зидди API-и фаъол иҷро мекунад, то шумо посухи воқеиро бубинед. Ин нуқтаи ниҳоиро дар консоли API кушоед
Тафсилот
Requires livechat.manage. The new widget is created switched off: a chat window that starts talking to a customer's visitors before they have asked for one is a consent problem, not a feature.
Ҷисми дархост
| Ном | Намуд | Талаб карда мешавад | Ин чӣ аст |
|---|---|---|---|
org_id | string | Не | — |
site_id | string | Не | — |
name | string | Бале | — |
team_name | string | Не | — |
allowed_origins | string[] | Не | — |
Ҷавоб
| Ном | Намуд | Талаб карда мешавад | Ин чӣ аст |
|---|---|---|---|
id | string | Бале | — |
site_id | string | Бале | — |
name | string | Бале | — |
public_key | string | Бале | — |
enabled | boolean | Бале | Whether the chat renders. Created FALSE always: the plugin ships in the deploy footprint of every WordPress site we host, so a widget may exist for a customer who never asked for… |
allowed_origins | string[] | Бале | Origins the widget may be embedded on. An EMPTY list refuses every page rather than allowing any — this is the only control stopping somebody else's site opening conversations… |
tier | string | Бале | The tier this widget is EFFECTIVELY on. Premium is included free with Zinn® hosting, so this may read premium on a widget nobody has paid for — read purchased_tier for what… |
tier_source | string<free, purchase, hosting> | Бале | Why the widget is on that tier. hosting means it is included with the customer's Zinn® hosting and there is nothing to buy; purchase means the Premium extra was bought for… |
purchased_tier | string | Бале | The tier actually PAID for, independent of any hosting inclusion. |
greeting | string | Бале | — |
team_name | string | Бале | — |
accent_colour | string | Бале | — |
position | string<left, right> | Бале | — |
hide_branding | boolean | Бале | — |
ai_enabled | boolean | Бале | — |
offline_email | string | Бале | — |
business_hours | object | Не | — |
open_now | boolean | Бале | — |
ai_allowance | ChatAiAllowance | Бале | — |
limits | object | Бале | — |
premium_extra_code | string | Бале | The catalogue code to buy for the premium tier. |
Хатоҳое, ки ин нуқтаи ниҳоӣ метавонад баргардонад
401 · 403 · 422