Wiki

Clone wiki

phpsdkswikly / Initialization

Initialization

The first step is to download this repository by clicking on 'Downloads' on the bottom left of your screen or with git.

Once downloaded you need to copy the file phpSdkSwikly.php in your project.

In the file where you will use the SDK you first have to load the SDK with the following code:

<?php
// 1. Load the SDK file.
require 'YOUR/PATH/phpSdkSwikly.php';

To be able to use the API correctly you need to be authenticated.

Once you have created your user account on Swikly you can ask for your API credentials.

Then you just need to create a SwiklyAPI object to be able to create or remove swiks.

<?php
$swkAPI = new \Swikly\SwiklyAPI('example_api_key', 'API_SECRET', 'developement');

Parameters:

  1. Api Key: provided by Swikly if you have an account and requested your credentials.
  2. Api Secret: provided by Swikly if you have an account and requested your credentials.
  3. Type: 'development' or 'production'. The 'development' type lets you test the API on our sandbox environment.

You will use the SwiklyAPI object to communicate with the API in order to:

Back to menu

Updated