Token based provisioning

( The Token ( &t= ) variable in the QR codes url )

The OEM QR code provisioning system allows several variables to be added to the url of the QR Howto page, which add additional configuration options to the provisioning information sent to Zoiper.

An example url of the type mentioned above looks like this:

One of the variables in this url is:

It's value in the url above is:

This variable is the token.

How is the token used by Zoiper ?

The token allows Zoiper to send a (http) request to a url of the provider and get information about the following configuration variables, which will be used in configuring Zoiper:
authentication username

For this to be possible a "Token URL" needs to be provided in the configuration settings in the OEM for the Softphone.

In the OEM "Configure options" form the "Token URL" field is placed in the group of "Optional" parameters.

Here is and example usage of the Token URL and the token.

The provider configures his Softphone and types for "Token URL" the value "" in.

Then he sends the following url to an end user of his:

When the end user scans the QR code on the page, he got to by following the url above, with Zoiper, Zoiper will receive an XML which will contain multiple configuration settings.
Two of these settings (in the format of XML tags) will be:

The token_url comes from the Configure options form in the OEM.
The token comes from the url the provider sent to the end user.

Zoiper will now append the token to the token_url to the following result:

Now Zoiper will send an http request to:

The response should be an XML of the format:

<?xml version="1.0" encoding="UTF-8"?> <options> <accounts> <account> <username>usernamevalue</username> <password>passwordvalue</password> <authentication_username>authusernamevalue</authentication_username> </account> </accounts> </options>

Zoiper can now use the values of the variables "username", "password" and "authentication username", received with the XML, to configure the new account.

If the token sent to the Token URL does not exist in the provider's database the XML returned should look like:

<?xml version="1.0" encoding="UTF-8"?> <error> <message>human friendly error message</message> <code>404</code> </error>

One may test this functionality on:

A test/example Token URL is:

Available tokens are:

The url
will display:

<?xml version="1.0" encoding="UTF-8"?> <options> <accounts> <account> <username>user1</username> <password>password1</password> <authentication_username>authuser1</authentication_username> </account> </accounts> </options>

The url
will display:

<?xml version="1.0" encoding="UTF-8"?> <error> <message>human friendly error message</message> <code>404</code> </error>