APIv3 Documentation



Introduction

API root URL: https://blitz303.com/tiny/api/3/

Both HTTPS and HTTP are supported. But HTTPS is recommended.

If you encounter issues using PATCH HTTP method, we support method override for POST calls via X-HTTP-Method-Override header.

Recommended encoding for request's payload - "application/json".
However "application/x-www-form-urlencoded" and "multipart/form-data" are also supported for POST requests. If you want to make PATCH (or other non POST) request with encoding other then "application/json", you should use POST method and set X-HTTP-Method-Override header.

GET-parameters should be "percent-encoded".

Responses are always encoded with "application/json".

All date-time values are in UTC±00:00.

Expired or inactive accounts can't access API. They will get error 1217.

Tinycc API v3 follows the REST API concept.

Tips to keep in mind:

After learning to make successful API calls through the above options, attempt to write your own code. An extension can help troubleshoot by separating client-code bugs from network issues.

Use PHP exception handling to see actual error messages, like this:

try{
        $surl = $client->shorten($url, $data);
}catch(\Exception $e){
        print $e->getMessage();
}

Set Content-Type header for HTTP requests. So headers part would look like this:

    headers: {
        'Authorization': 'Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
        'Content-Type': 'application/json',
        'Content-Length': message.length
    }

Next steps: