Zlinkk API

Zlinkk, dünyada en çok güvenilen bağlantı yönetim platformudur. Zlinkk API'sini kullanarak, bağlantılarınızı otomatik olarak kısaltıp derin analizler yapabileceksiniz.

Zlinkk'in en temel özelliği bağlantıları kısaltmak olsa da, kullanıcılarımız Zlinkk API'sini kullanarak tümleşik uygulamalarını kısa linkler oluşturup SMS ve Mail aracılığıyla gönderiyorlar.

Başlamak için neye ihtiyacım var?

  • Zlinkk hesabı. Ücretsiz olarak kayıt olup hemen kısa bağlantılar oluşturabilirsiniz!

İlk bağlantınızı kısaltın!

  1. Hesabınıza giriş yapıp token oluşturun.
  2. Örnek kodları kullanarak sisteminizi hemen entegre edin.
  3. POST URL: https://zlinkk.com/api/v1/shorten. 
     



    "title": "Ba1bc23dE4F", 
    "domain": "ppl.la", 
    "link": "https://dev.zlinkk.com/" 


PHP

$curl = curl_init();

curl_setopt_array($curl, array(

  CURLOPT_URL => 'https://zlinkk.com/api/v1/shorten',

  CURLOPT_RETURNTRANSFER => true,

  CURLOPT_ENCODING => '',

  CURLOPT_MAXREDIRS => 10,

  CURLOPT_TIMEOUT => 0,

  CURLOPT_FOLLOWLOCATION => true,

  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,

  CURLOPT_CUSTOMREQUEST => 'POST',

  CURLOPT_POSTFIELDS => array('link' => 'https://zlinkk.com','title' => 'Test Title Api','domain' => 'ppl.la'),

  CURLOPT_HTTPHEADER => array(

    'Authorization: Bearer  //API anahtarınızı bu alana yazın'

  ),

));

$response = curl_exec($curl);

curl_close($curl);
print_r($response);



.NET

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;

namespace URLShortenerExample
{
   class Program
   {
       static async Task Main(string[] args)
       {
           var url = "https://zlinkk.com/api/v1/shorten";
           var apiKey = "Your_API_Key"; // API Key

           var body = new List<KeyValuePair<string, string>>
           {
               new KeyValuePair<string, string>("link", "https://zlinkk.com"),
               new KeyValuePair<string, string>("title", "Test Title Api"),
               new KeyValuePair<string, string>("domain", "ppl.la")
           };

           using (var httpClient = new HttpClient())
           {
               httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiKey}");

               try
               {
                   var response = await httpClient.PostAsync(url, new FormUrlEncodedContent(body));
                   response.EnsureSuccessStatusCode(); // Errros message

                   var responseBody = await response.Content.ReadAsStringAsync();
                   Console.WriteLine(responseBody);
                   Console.ReadLine();
               }
               catch (HttpRequestException ex)
               {
                   Console.WriteLine("İstek hatası: " + ex.Message);
                   Console.ReadLine();
               }
           }
       }
   }
}


Python


import requests

url = 'https://zlinkk.com/api/v1/shorten'
api_key = 'API_Key'  # API anahtarınızı bu alana yazın

headers = {
   'Authorization': f'Bearer {api_key}',
   'Content-Type': 'application/json',
}

data = {
   'link': 'https://zlinkk.com',
   'title': 'Test Title Api',
   'domain': 'ppl.la',
}

try:
   response = requests.post(url, json=data, headers=headers)
   response.raise_for_status()  # Errros message

   print(response.json())
except requests.exceptions.RequestException as ex:
   print("Errros message:", ex)



Java


import java.io.IOException;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;

public class URLShortenerExample {
   public static void main(String[] args) throws IOException {
       String url = "https://zlinkk.com/api/v1/shorten";
       String apiKey = "API_Key"; // API anahtarınızı bu alana yazın

       String data = "{\"link\": \"https://zlinkk.com\", \"title\": \"Test Title Api\", \"domain\": \"ppl.la\"}";
       byte[] postData = data.getBytes(StandardCharsets.UTF_8);

       HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
       conn.setRequestMethod("POST");
       conn.setRequestProperty("Authorization", "Bearer " + apiKey);
       conn.setRequestProperty("Content-Type", "application/json");
       conn.setDoOutput(true);

       try (OutputStream os = conn.getOutputStream()) {
           os.write(postData);
       }

       if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
           java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(conn.getInputStream()));
           String inputLine;
           StringBuilder response = new StringBuilder();
           while ((inputLine = in.readLine()) != null) {
               response.append(inputLine);
           }
           in.close();
           System.out.println(response.toString());
       } else {
           System.out.println("Errros message: " + conn.getResponseMessage());
       }
   }
}

 

Ruby 

require 'net/http'

require 'json'

url = URI('https://zlinkk.com/api/v1/shorten')

api_key = 'API_Key' # API anahtarınızı buraya yazın

data = {

  link: 'https://zlinkk.com',

  title: 'Test Title Api',

  domain: 'ppl.la'

}

http = Net::HTTP.new(url.host, url.port)

http.use_ssl = true

request = Net::HTTP::Post.new(url)

request['Authorization'] = "Bearer #{api_key}"

request['Content-Type'] = 'application/json'

request.body = data.to_json

response = http.request(request)

if response.code == '200'

  puts response.body

else

  puts "Errors message: #{response.message}"

end

 

JavaScript / Node JS 

const axios = require('axios');

const url = 'https://zlinkk.com/api/v1/shorten';

const apiKey = 'API_Key'; // API anahtarınızı buraya yazın

const data = {

  link: 'https://zlinkk.com',

  title: 'Test Title Api',

  domain: 'ppl.la'

};

axios.post(url, data, {

  headers: {

    'Authorization': `Bearer ${apiKey}`,

    'Content-Type': 'application/json'

  }

})

  .then(response => {

    console.log(response.data);

  })

  .catch(error => {

    console.error('Errros message:', error.message);

  });

 

A file icon for cookie use. Çerez Kullanımı This web page is designed to give you a better user experience. uses cookies. From Zlinkk services Please confirm the Use of Cookies to take advantage of it.
Zlink logo, which includes Zlink characters and an emblem in a dark version. Zlink logo, which includes Zlink characters and an emblem in a light version.
Giriş Yap