Start Here: Use This Section When #
- You need to connect WordPress, WooCommerce, PrestaShop, Shopify, or another external system.
- Your own app or a developer needs to send WhatsApp messages (for example login codes or order updates) through Peikly.
- A token was lost, rotated, revoked, or needs replacement.
- An integration is failing with
401,403, or signature-related errors.
Prerequisites #
- CompanyAdmin role.
- A subscription plan that includes external integrations / API access.
If your plan does not include it, the Add New Token button is disabled and a yellow notice says Token management is unavailable on your current plan. with the reason "The current subscription package does not include external integrations API access." Upgrade your plan to unlock it.
Create a New Token #
- Open Settings → Company Settings → Third-Party Tokens (use the Integration tokens shortcut at the top).
- Click Add New Token. A window opens.
- Fill in the form:
| Field | What to enter | Rules |
|---|---|---|
| Token Name | A clear label, e.g. WordPress Storefront | Required, up to 200 characters |
| Third-Party URL | The site that will use the token, e.g. https://store.example.com | Optional, must be a valid URL, up to 256 characters |
| Description | A note about where it is used | Optional, up to 500 characters |
| Expires At (UTC) | A date and time after which the token stops working | Optional. Note: UTC time, not your local time. Leave empty for no expiry. |
| Scopes | Tick what the token is allowed to do (see the table below) | Required: tick at least one. Give each system only what it needs. |
The scopes, grouped as in the window:
| Group | Scope | What a system with this scope can do |
|---|---|---|
| Account & numbers | Check the connection and read your WhatsApp numbers (status, quality, limits) | |
| Templates | List your message templates and read their text, buttons and variables | |
| Send messages âš | Send template messages (including verification codes) and replies to your customers. Meta bills these messages to you. | |
| Message status & inbox | See whether sent messages were delivered and read, and read the messages customers send in | |
| Webhooks | Manage webhooks âš | Register addresses that Peikly calls when a WhatsApp message is delivered or a customer writes in. These events carry customer messages and numbers. |
| Contacts | Read contacts âš | Search your contacts and read their details (personal data) |
| Contacts | Add & change contacts | Create contacts, change details and tags, record opt-outs, delete contacts |
| Social media | Connected accounts | List your connected Instagram, Facebook, Pinterest, LinkedIn and YouTube accounts |
| Social media | Read posts | List posts and see whether they were published, and their figures |
| Social media | Publish posts âš | Create, schedule and publish posts on your accounts, and delete posts not yet published |
| Website plugins (WordPress) | Send events | Send website events (orders, sign-ups, posts) that start automations |
| Website plugins (WordPress) | Read channel catalogue | See which channels and automations are available for website events |
| Website plugins (WordPress) | Preview templates | Preview what an automation would send for a website event |
| Website plugins (WordPress) | List automations | List the automations that match a website event |
| Full access | Full access âš | Everything, including abilities added later. Ticking it switches the other boxes off. Use only for a system you fully control. |
Examples: a login system that sends codes by WhatsApp needs Templates, Send messages and Message status & inbox. A website that posts new articles to your social accounts needs Connected accounts and Publish posts. The WordPress plugin needs Send events (Guided Setup ticks it for you).
Whose name the token uses: anything a token creates or changes (contacts, social posts, webhooks) is done in the name of the company admin who last saved the token, with that person’s rights. Posts only go out where that admin may publish. If that admin leaves or is no longer an admin, the token can still read but cannot change anything until another company admin opens it with Edit and clicks Save.
- Click Create Token.
- A yellow box shows the raw token. Click Copy Token and store it in your external system straight away.
Critical: the raw token is shown once. It cannot be viewed again. In the list, Copy Token is only active right after creation; afterwards it is greyed out with the hint "The raw token secret is only available immediately after creation."
If you leave the page without copying the token -> create a new token immediately -> update the external system with the replacement -> remove the lost one.
The Token List #
Columns: Name (with description), Site, Token Prefix (the first 8 characters, for recognising a token — it cannot be used to sign in), Scopes (a yellow Full access badge for tokens that can do everything, including older tokens created without any scope ticked), Status (Active / Inactive), Last Used and when it was created.
Webhooks #
A system with the Manage webhooks scope can ask Peikly to send events (a message was delivered, a customer wrote in) to its own address. Every such address is listed under Webhooks, below the tokens: the address, the events, which token registered it, its status and the last delivery. The owner also gets a notice each time one is added.
- Remove (bin) stops Peikly sending anything there at once. Remove any address you do not recognise.
- Stopped by Peikly means deliveries kept failing for 3 days, so Peikly stopped them and told the owner. The system that registered it switches it back on once its side is fixed.
Manage Existing Tokens #
- Edit (pencil): change the token’s name, description and scopes. The token itself stays the same, so the other system keeps working; the new scopes apply from its next request. Use it to narrow an old Full access token. Messages: "Token updated. The new scopes apply from the next request it makes." /
Choose at least one scope. - Deactivate / Activate: click the button, confirm in the pop-up. A deactivated token stops authenticating until reactivated. Messages: "Token deactivated successfully." / "Token activated successfully." /
Unable to update token status. - Remove: click Remove and confirm. The token is permanently revoked and can never be used again. Messages: "Token removed successfully." /
Unable to remove token.
If X -> Do Y #
- If the integration says
401 Unauthorized-> verify the raw token value in the external system -> if uncertain, generate a replacement token. - If the integration says
403 Forbiddenwithinsufficient_scope-> it names the scope it needs -> click Edit on the token and tick that scope. - If the integration says
403 Forbiddenotherwise -> check whether the token is Inactive or expired, and that your plan includes API access (and WhatsApp, for WhatsApp messages). - If you do not know which token a site is using -> create a new token with a clear name and URL -> replace the old token in that site.
- If a site has been retired -> Remove its token instead of leaving it active.
- If Add New Token is greyed out -> your plan does not include API access (see above).
- If a token suddenly stops working on a date -> it reached its Expires At (UTC) time; create a new one.
Errors, Messages, and Exceptions #
| Message | Why It Happens | How to Fix |
|---|---|---|
The Name field is required. | Token Name left empty | Enter a name |
| Message about the URL being invalid | Third-Party URL is not a full URL | Include https:// |
| Message about a maximum length | A field is over its limit (name 200, URL 256, description 500) | Shorten it |
The current subscription package does not include external integrations API access. | Your plan has no API access | Upgrade the plan |
Unable to create token. | The server could not create it | Retry; contact support if it persists |
Choose at least one scope: what this token may do. | No scope ticked | Tick the scopes the system needs |
| Token not visible after creation | You navigated away before copying | Remove that token and create a new one |
Diagnosis Flow #
- If the external system cannot authenticate, check whether the token exists, is Active, and has not expired.
- If the token was copied long ago and you cannot verify it, replace it.
- If authentication succeeds but events still fail, move to 21. External Integrations.