Skip to main content

Getting Started

Setup

For you to start using the Resellme services, you need to sign-up for a Resellme account, that's if you don't already have one and create Authentication keys. Details on how to do this are found on this page

Quickstart Guides

These quickstart guides will teach you how to become a reseller on this platform. We'll walk you step-by-step through signing up for Resellme, setting up your platform.

Installation

This SDK can be installed via composer.

$ composer require privyreza/rm-php-sdk

Usage

Make sure you already got you developer token. If you dont have the token refer to this guide: Developer Token

Initialization

require "vendor/autoload.php";
$token = getenv('RM_TOKEN');
// Load the Client
use Resellme\Client;

// Initialize the Client
$client = new Client($token);

Check Domain Availability

$domain = 'resellme-testdomain.co.zw';

/*
* Check availability
* @return array - with domain status
*
*/
$domainSearch = $client->searchDomain($domain);

Registering a New Domain

Make sure you are testing on the sandbox platform.

/**
* Domain Details
*
*/
// Domain Owner
$contact = [
"contacts" => [
"registrant" => [
"first_name" => "SDK Privy",
"last_name" =>"SDK Reza",
"email" =>"privyreza@xxx.com",
"company" =>"SDK Company",
"mobile" =>"0773234827",
"street_address" =>"78 Test Street",
"core_business" =>"SDK Test Core Business",
"city" =>"Nairobi",
"country" =>"Kenya"
]
]
];

// Nameservers
$nameservers = [
"ns1" => "ns1.cloud-dns.com",
"ns2" => "ns2.cloud-dns.com"
];

// Prepare the data
$data = [
'domain' => $domain,
'nameservers' => $nameservers,
'contacts' => $contacts
];

/**
* Register the domain now
* @return array
*
*/
$domain = $client->registerDomain($data);

Get Domains

You can use this to fetch all your domains. You can pass filters if you want a filtered result.

$filters = [
'status' => 'registered', // Get Registered only domains
'name' => 'resellme-testdomain.co.zw' // Get By Domain name
];

$domains = $client->getDomains($filters);