Webanizr Logo
Open / sluit menu
Module webanizrTokens

The module webanizrTokens performs all sorts of tasks regarding the Webanizr Tokens. Webanizr tokens are needed to gain access to different Webanizr services or data.

syntax

webanizr.collect('webanizrTokens', parameters, callback);

parameters

WebanizrTokens accepts the following parameters:

type__action (required)

The type of task the module needs to perform. The following tasks are supported:

  • create: create a new token
  • verify: verify if the token is correct
  • get_info: get the content of the body of the token

id__merchant (required for the create task)

Only certified merchants can create Webanizr tokens. You can request your own merchant id by contacting Content Power.

domain__website (required for the create task)

The domain for which the token is requested. The token can only be used from that domain.

token__webanizr (required for the verify and info tasks)

The token that needs to be verified.

check__origin (optional for the verify task)

If set to true, the verify service will also check the domain set in the token.

key__merchant (required for the info task)

The secret key of the merchant. You can request your own merchant id by contacting Content Power.

callback

The callback is called after the editor is loaded. The callback function is called with empty data.

demo

request a token:

https://cdn.cpmodules.webanizr.com/demo/webanizr-token/index.html

verify a token:

https://cdn.cpmodules.webanizr.com/demo/webanizr-token-verify/index.html

get info on a token:

https://cdn.cpmodules.webanizr.com/demo/webanizr-token-info/index.html