dev-master
9999999-devRegister.ch public API for customers with direct activation
The Requires
The Development Requires
Wallogit.com
2017 © Pedro Peláez
Register.ch public API for customers with direct activation
The Register.ch public API project wraps around Guzzle and offers HMAC authentication. You can use the client to easily connect to the Register.ch public API endpoint., (*2)
To learn more about the Register.ch public API, go to https://api.register.ch/., (*3)
composer require register-ch/register-api
The code example below registers a new domain name on your account., (*4)
<?php
require dirname(__DIR__) . '/vendor/autoload.php';
$client = new \RegisterCh\Client(
[
'debug' => true,
'base_uri' => 'https://api.register.ch',
'registerch_api_key' => 'XXXX',
'registerch_api_secret' => 'YYYY'
]
);
$body = new \stdClass();
$body->domain_name = 'domain-name-to-register.eu';
// Register domain name
$response = $client->post('/v2/domains/registrations', ['json' => $body]);
// Dump location header with link to provisioning job
var_dump(
$response->getHeader('Location')
);
Go to the examples folder to see more examples., (*5)
Register.ch public API for customers with direct activation