Skip to content

API

REST API dapat digunakan untuk membuat web atau aplikasi desktop yang terintegrasi dengan akun REST Anda. Hal ini dapat memungkinkan Anda melakukan aktivitas secara terprogram seperti pencarian domain, registrasi domain, transfer domain, dan lain-lain melalui aplikasi yang Anda buat.

Dengan adanya REST API Anda dapat melakukan:

  • Penjualan domain, kelola domain, dan lain-lain melalui aplikasi Anda.
  • Pengelolaan customers dan contact customers.
  • Pengelolaan DNS.
  • Dan lain-lain.

Authentication

Metode otentikasi yang digunakan adalah Basic Auth. Untuk melakukan otentikasi Basic Auth diperlukan reseller ID dan API Key. Cara Generate API Key dapat klik link berikut.

Contoh Basic Auth

bash
curl -u "123:QxbhGwyiThRhbU3m4uZtPHHiOIeGlTlt" \
  https://api.rdash.id/v1/account/profile

# Or

curl -H "Authorization: Basic $(echo -n '123:QxbhGwyiThRhbU3m4uZtPHHiOIeGlTlt' | base64)" \
  https://api.rdash.id/v1/account/profile
php
<?php
$resellerId = '123';
$apiKey = 'QxbhGwyiThRhbU3m4uZtPHHiOIeGlTlt';

$ch = curl_init('https://api.rdash.id/v1/account/profile');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$resellerId:$apiKey");

$response = curl_exec($ch);
curl_close($ch);

// Or Using Guzzle HTTP Client

use GuzzleHttp\Client;

$client = new Client([
    'auth' => [$resellerId, $apiKey]
]);

$response = $client->get('https://api.rdash.id/v1/account/profile');
javascript
const resellerId = "123";
const apiKey = "QxbhGwyiThRhbU3m4uZtPHHiOIeGlTlt";

const credentials = btoa(`${resellerId}:${apiKey}`);

fetch("https://api.rdash.id/v1/account/profile", {
  method: "GET",
  headers: {
    Authorization: `Basic ${credentials}`,
  },
})
  .then((response) => response.json())
  .then((data) => console.log(data))
  .catch((error) => console.error("Error:", error));

// Or Using Axios

import axios from "axios";

const response = await axios.get("https://api.rdash.id/v1/account/profile", {
  auth: {
    username: "123",
    password: "QxbhGwyiThRhbU3m4uZtPHHiOIeGlTlt",
  },
});

Reseller Open API (Live Tester)

Anda dapat mencoba dengan versi live tester melalui https://api.rdash.id/swagger. Kemudian klik Authorize.

  • Username: (diisi sesuai reseller ID)
  • Password: (diisi sesuai API Key)

TIP

Apabila Anda ingin mencoba versi live tester melalui https://api.rdash.id/swagger, maka pastikan kembali IP address yang Anda gunakan telah Anda masukkan sebagai whitelist saat generate API Key.

RDASH Domain Registrar System