View Categories

7.3 Third-Party API Tokens

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 #

  1. Open Settings → Company Settings → Third-Party Tokens (use the Integration tokens shortcut at the top).
  2. Click Add New Token. A window opens.
  3. Fill in the form:
FieldWhat to enterRules
Token NameA clear label, e.g. WordPress StorefrontRequired, up to 200 characters
Third-Party URLThe site that will use the token, e.g. https://store.example.comOptional, must be a valid URL, up to 256 characters
DescriptionA note about where it is usedOptional, up to 500 characters
Expires At (UTC)A date and time after which the token stops workingOptional. Note: UTC time, not your local time. Leave empty for no expiry.
ScopesTick 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:

GroupScopeWhat a system with this scope can do
WhatsAppAccount & numbersCheck the connection and read your WhatsApp numbers (status, quality, limits)
WhatsAppTemplatesList your message templates and read their text, buttons and variables
WhatsAppSend messages âš Send template messages (including verification codes) and replies to your customers. Meta bills these messages to you.
WhatsAppMessage status & inboxSee whether sent messages were delivered and read, and read the messages customers send in
WebhooksManage webhooks âš Register addresses that Peikly calls when a WhatsApp message is delivered or a customer writes in. These events carry customer messages and numbers.
ContactsRead contacts âš Search your contacts and read their details (personal data)
ContactsAdd & change contactsCreate contacts, change details and tags, record opt-outs, delete contacts
Social mediaConnected accountsList your connected Instagram, Facebook, Pinterest, LinkedIn and YouTube accounts
Social mediaRead postsList posts and see whether they were published, and their figures
Social mediaPublish posts âš Create, schedule and publish posts on your accounts, and delete posts not yet published
Website plugins (WordPress)Send eventsSend website events (orders, sign-ups, posts) that start automations
Website plugins (WordPress)Read channel catalogueSee which channels and automations are available for website events
Website plugins (WordPress)Preview templatesPreview what an automation would send for a website event
Website plugins (WordPress)List automationsList the automations that match a website event
Full accessFull 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.

  1. Click Create Token.
  2. 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 Forbidden with insufficient_scope -> it names the scope it needs -> click Edit on the token and tick that scope.
  • If the integration says 403 Forbidden otherwise -> 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 #

MessageWhy It HappensHow to Fix
The Name field is required.Token Name left emptyEnter a name
Message about the URL being invalidThird-Party URL is not a full URLInclude https://
Message about a maximum lengthA 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 accessUpgrade the plan
Unable to create token.The server could not create itRetry; contact support if it persists
Choose at least one scope: what this token may do.No scope tickedTick the scopes the system needs
Token not visible after creationYou navigated away before copyingRemove that token and create a new one

Diagnosis Flow #

  1. If the external system cannot authenticate, check whether the token exists, is Active, and has not expired.
  2. If the token was copied long ago and you cannot verify it, replace it.
  3. If authentication succeeds but events still fail, move to 21. External Integrations.
Scroll to Top