;

Teknik API


The Teknik API is free for everyone to use, and is defined on a per service basis.

The general API calls can be summarized as follows: https://api.teknik.io/v1/Service/Action

Basic Authentication

For some services, you may be required to authenticate to access them, or to associate generated content with your account. In all cases, the same authentication method is used.

Generating Authentication Tokens

To generate a new authentication token, navigate to your user profile and click the Security tab. There, you can manage your existing tokens and generate new ones.

Using the Authentication Tokens

To use Basic Authentication with your token, simply send the username and token.

For example, if you're accessing the API via cURL, the following command would associate the create paste with your account. Just replace <username> with your Teknik username and <token> with your token.
$ curl -u <username>:<token> --data code="Test" https://api.teknik.io/v1/Paste

Responses

All responses are returned as json. The returned json can contain any of the following sections.

Results

{"result":{"<resultData>":"<value>"}}
Errors
{"error":{"message":"<errorMessage>"}}