Domeni
Pronađite svoj domen
PretragaAftermarket
Upravljajte svojim portfoliom
Usluge posredovanja| Method | Description |
|---|---|
| GET | GET Request: Retrieve detailed information about a specified resource |
| POST | POST Request: Create a new resource |
| PUT | PUT Request: Fully update the specified resource |
| DELETE | DELETE Request: Remove the specified resource |
apiKey + "\n" + fullPathAndQuery + "\n" + (xRequestId or empty String) + "\n" + (requestBody or empty String)
apiKey = "your_api_key"
fullPathAndQuery = "/restful/v2/some/endpoint?param=value"
xRequestId = "unique-request-id"
requestBody = "{\"key\":\"value\"}"
stringToSign = "your_api_key\n/restful/v2/some/endpoint?param=value\nunique-request-id\n{\"key\":\"value\"}"
import base64
import hashlib
import hmac
import uuid
def create_signature(api_key, api_secret, full_path_and_query, x_request_id, request_body=""):
string_to_sign = (
api_key + "\n" +
full_path_and_query + "\n" +
(x_request_id or "") + "\n" +
(request_body or "")
)
digest = hmac.new(
api_secret.encode("utf-8"),
string_to_sign.encode("utf-8"),
hashlib.sha256
).digest()
return base64.b64encode(digest).decode("utf-8")
api_key = "your_api_key"
api_secret = "your_secret"
full_path_and_query = "/restful/v2/accounts/info"
x_request_id = str(uuid.uuid4())
request_body = ""
x_signature = create_signature(
api_key,
api_secret,
full_path_and_query,
x_request_id,
request_body
)
print("X-Request-ID:", x_request_id)
print("X-Signature:", x_signature)
const crypto = require("crypto");
function createSignature(apiKey, apiSecret, fullPathAndQuery, xRequestId, requestBody = "") {
const stringToSign =
apiKey + "\n" +
fullPathAndQuery + "\n" +
(xRequestId || "") + "\n" +
(requestBody || "");
return crypto
.createHmac("sha256", Buffer.from(apiSecret, "utf8"))
.update(Buffer.from(stringToSign, "utf8"))
.digest("base64");
}
const apiKey = "your_api_key";
const apiSecret = "your_secret";
const fullPathAndQuery = "/restful/v2/accounts/info";
const xRequestId = crypto.randomUUID();
const requestBody = "";
const xSignature = createSignature(
apiKey,
apiSecret,
fullPathAndQuery,
xRequestId,
requestBody
);
console.log("X-Request-ID:", xRequestId);
console.log("X-Signature:", xSignature);
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.UUID;
public class XSignatureExample {
public static String createSignature(
String key,
String secret,
String fullPathAndQuery,
String xRequestId,
String requestBody
) throws Exception {
if (xRequestId == null) xRequestId = "";
if (requestBody == null) requestBody = "";
String stringToSign =
key + "\n" +
fullPathAndQuery + "\n" +
xRequestId + "\n" +
requestBody;
Mac mac = Mac.getInstance("HmacSHA256");
SecretKeySpec secretKey = new SecretKeySpec(
secret.getBytes(StandardCharsets.UTF_8),
"HmacSHA256"
);
mac.init(secretKey);
byte[] digest = mac.doFinal(stringToSign.getBytes(StandardCharsets.UTF_8));
return Base64.getEncoder().encodeToString(digest);
}
public static void main(String[] args) throws Exception {
String apiKey = "your_api_key";
String secret = "your_secret";
String fullPathAndQuery = "/restful/v2/accounts/info";
String xRequestId = UUID.randomUUID().toString();
String requestBody = "";
String xSignature = createSignature(
apiKey,
secret,
fullPathAndQuery,
xRequestId,
requestBody
);
System.out.println("X-Request-ID: " + xRequestId);
System.out.println("X-Signature: " + xSignature);
}
}
#include <iostream>
#include <string>
#include <openssl/hmac.h>
#include <openssl/evp.h>
#include <openssl/buffer.h>
std::string base64Encode(const unsigned char* input, int length) {
BIO* bio = BIO_new(BIO_s_mem());
BIO* b64 = BIO_new(BIO_f_base64());
BUF_MEM* bufferPtr;
BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
bio = BIO_push(b64, bio);
BIO_write(bio, input, length);
BIO_flush(bio);
BIO_get_mem_ptr(bio, &bufferPtr);
std::string result(bufferPtr->data, bufferPtr->length);
BIO_free_all(bio);
return result;
}
std::string createSignature(
const std::string& key,
const std::string& secret,
const std::string& fullPathAndQuery,
const std::string& xRequestId,
const std::string& requestBody
) {
std::string stringToSign =
key + "\n" +
fullPathAndQuery + "\n" +
xRequestId + "\n" +
requestBody;
unsigned char digest[EVP_MAX_MD_SIZE];
unsigned int digestLength = 0;
HMAC(
EVP_sha256(),
secret.c_str(),
static_cast<int>(secret.length()),
reinterpret_cast<const unsigned char*>(stringToSign.c_str()),
stringToSign.length(),
digest,
&digestLength
);
return base64Encode(digest, digestLength);
}
int main() {
std::string key = "your_api_key";
std::string secret = "your_secret";
std::string fullPathAndQuery = "/restful/v2/accounts/info";
// X-Request-ID is optional. If provided, generate a new UUID for each request.
// Leave it as an empty string if you do not want to send X-Request-ID.
std::string xRequestId = "550e8400-e29b-41d4-a716-446655440000";
std::string requestBody = "";
std::string xSignature = createSignature(
key,
secret,
fullPathAndQuery,
xRequestId,
requestBody
);
std::cout << "X-Request-ID: " << xRequestId << std::endl;
std::cout << "X-Signature: " << xSignature << std::endl;
return 0;
}
<?php
function createSignature(
string $apiKey,
string $apiSecret,
string $fullPathAndQuery,
string $xRequestId,
string $requestBody = ""
): string {
$stringToSign =
$apiKey . "\n" .
$fullPathAndQuery . "\n" .
($xRequestId ?: "") . "\n" .
($requestBody ?: "");
$rawHmac = hash_hmac(
"sha256",
$stringToSign,
$apiSecret,
true
);
return base64_encode($rawHmac);
}
function generateRequestId(): string {
$bytes = bin2hex(random_bytes(16));
return sprintf(
"%s-%s-%s-%s-%s",
substr($bytes, 0, 8),
substr($bytes, 8, 4),
substr($bytes, 12, 4),
substr($bytes, 16, 4),
substr($bytes, 20, 12)
);
}
$apiKey = "your_api_key";
$apiSecret = "your_secret";
$fullPathAndQuery = "/restful/v2/accounts/info";
$xRequestId = generateRequestId();
$requestBody = "";
$xSignature = createSignature(
$apiKey,
$apiSecret,
$fullPathAndQuery,
$xRequestId,
$requestBody
);
echo "X-Request-ID: " . $xRequestId . PHP_EOL;
echo "X-Signature: " . $xSignature . PHP_EOL;
{
"domainName": "domain.com",
"showPrice": "yes",
"currency": "USD"
}
{
"Code": 200,
"Message": "Success",
"Data": {}
}
webhookKey + "\n" + fullPathAndQuery + "\n" + (xRequestId or empty String) + "\n" + (requestBody or empty String)
webhookKey = "your_webhook_key"
fullPathAndQuery = "/v2/some/endpoint?param=value"
xRequestId = "unique-request-id"
requestBody = "{\"key\":\"value\"}"
stringToSign = "your_webhook_key\n/v2/some/endpoint?param=value\nunique-request-id\n{\"key\":\"value\"}"
import base64
import hashlib
import hmac
import uuid
def create_signature(webhook_key, webhook_secret, full_path_and_query, x_request_id, request_body=""):
string_to_sign = (
webhook_key + "\n" +
full_path_and_query + "\n" +
(x_request_id or "") + "\n" +
(request_body or "")
)
digest = hmac.new(
webhook_secret.encode("utf-8"),
string_to_sign.encode("utf-8"),
hashlib.sha256
).digest()
return base64.b64encode(digest).decode("utf-8")
webhook_key = "your_webhook_key"
webhook_secret = "your_secret"
full_path_and_query = "/v2/some/webhook/path"
x_request_id = str(uuid.uuid4())
request_body = ""
x_signature = create_signature(
webhook_key,
webhook_secret,
full_path_and_query,
x_request_id,
request_body
)
print("X-Request-ID:", x_request_id)
print("X-Signature:", x_signature)
const crypto = require("crypto");
function createSignature(webhookKey, webhookSecret, fullPathAndQuery, xRequestId, requestBody = "") {
const stringToSign =
webhookKey + "\n" +
fullPathAndQuery + "\n" +
(xRequestId || "") + "\n" +
(requestBody || "");
return crypto
.createHmac("sha256", Buffer.from(webhookSecret, "utf8"))
.update(Buffer.from(stringToSign, "utf8"))
.digest("base64");
}
const webhookKey = "your_webhook_key";
const webhookSecret = "your_secret";
const fullPathAndQuery = "/v2/some/webhook/path";
const xRequestId = crypto.randomUUID();
const requestBody = "";
const xSignature = createSignature(
webhookKey,
webhookSecret,
fullPathAndQuery,
xRequestId,
requestBody
);
console.log("X-Request-ID:", xRequestId);
console.log("X-Signature:", xSignature);
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.UUID;
public class XSignatureExample {
public static String createSignature(
String key,
String secret,
String fullPathAndQuery,
String xRequestId,
String requestBody
) throws Exception {
if (xRequestId == null) xRequestId = "";
if (requestBody == null) requestBody = "";
String stringToSign =
key + "\n" +
fullPathAndQuery + "\n" +
xRequestId + "\n" +
requestBody;
Mac mac = Mac.getInstance("HmacSHA256");
SecretKeySpec secretKey = new SecretKeySpec(
secret.getBytes(StandardCharsets.UTF_8),
"HmacSHA256"
);
mac.init(secretKey);
byte[] digest = mac.doFinal(stringToSign.getBytes(StandardCharsets.UTF_8));
return Base64.getEncoder().encodeToString(digest);
}
public static void main(String[] args) throws Exception {
String webhookKey = "your_webhook_key";
String secret = "your_secret";
String fullPathAndQuery = "/v2/some/webhook/path";
String xRequestId = UUID.randomUUID().toString();
String requestBody = "";
String xSignature = createSignature(
webhookKey,
secret,
fullPathAndQuery,
xRequestId,
requestBody
);
System.out.println("X-Request-ID: " + xRequestId);
System.out.println("X-Signature: " + xSignature);
}
}
#include <iostream>
#include <string>
#include <openssl/hmac.h>
#include <openssl/evp.h>
#include <openssl/buffer.h>
std::string base64Encode(const unsigned char* input, int length) {
BIO* bio = BIO_new(BIO_s_mem());
BIO* b64 = BIO_new(BIO_f_base64());
BUF_MEM* bufferPtr;
BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
bio = BIO_push(b64, bio);
BIO_write(bio, input, length);
BIO_flush(bio);
BIO_get_mem_ptr(bio, &bufferPtr);
std::string result(bufferPtr->data, bufferPtr->length);
BIO_free_all(bio);
return result;
}
std::string createSignature(
const std::string& key,
const std::string& secret,
const std::string& fullPathAndQuery,
const std::string& xRequestId,
const std::string& requestBody
) {
std::string stringToSign =
key + "\n" +
fullPathAndQuery + "\n" +
xRequestId + "\n" +
requestBody;
unsigned char digest[EVP_MAX_MD_SIZE];
unsigned int digestLength = 0;
HMAC(
EVP_sha256(),
secret.c_str(),
static_cast<int>(secret.length()),
reinterpret_cast<const unsigned char*>(stringToSign.c_str()),
stringToSign.length(),
digest,
&digestLength
);
return base64Encode(digest, digestLength);
}
int main() {
std::string key = "your_webhook_key";
std::string secret = "your_secret";
std::string fullPathAndQuery = "/v2/some/webhook/path";
// X-Request-ID is optional. If provided, generate a new UUID for each request.
// Leave it as an empty string if you do not want to send X-Request-ID.
std::string xRequestId = "550e8400-e29b-41d4-a716-446655440000";
std::string requestBody = "";
std::string xSignature = createSignature(
key,
secret,
fullPathAndQuery,
xRequestId,
requestBody
);
std::cout << "X-Request-ID: " << xRequestId << std::endl;
std::cout << "X-Signature: " << xSignature << std::endl;
return 0;
}
<?php
function createSignature(
string $webhookKey,
string $webhookSecret,
string $fullPathAndQuery,
string $xRequestId,
string $requestBody = ""
): string {
$stringToSign =
$webhookKey . "\n" .
$fullPathAndQuery . "\n" .
($xRequestId ?: "") . "\n" .
($requestBody ?: "");
$rawHmac = hash_hmac(
"sha256",
$stringToSign,
$webhookSecret,
true
);
return base64_encode($rawHmac);
}
function generateRequestId(): string {
$bytes = bin2hex(random_bytes(16));
return sprintf(
"%s-%s-%s-%s-%s",
substr($bytes, 0, 8),
substr($bytes, 8, 4),
substr($bytes, 12, 4),
substr($bytes, 16, 4),
substr($bytes, 20, 12)
);
}
$webhookKey = "your_webhook_key";
$webhookSecret = "your_secret";
$fullPathAndQuery = "/v2/some/webhook/path";
$xRequestId = generateRequestId();
$requestBody = "";
$xSignature = createSignature(
$webhookKey,
$webhookSecret,
$fullPathAndQuery,
$xRequestId,
$requestBody
);
echo "X-Request-ID: " . $xRequestId . PHP_EOL;
echo "X-Signature: " . $xSignature . PHP_EOL;
{
"event": "domain_registration",
"event_id": 12345,
"timestamp": 1700000000000,
"data": {
"DomainName": "example.com",
"RegistrationDate": "2022-01-01",
"ExpirationDate": "2023-01-01",
"Registrant": {
"Name": "JohnDoe",
"Email": "[email protected]",
"Phone": "+1.1234567890"
}
}
}
| Parameter | Description |
|---|---|
| event | The type of event that triggered the notification. |
| event_id | The id of the event that triggered the notification. |
| timestamp | The timestamp when the event occurred. |
| data | The data associated with the event. |
{
"Status": "200"
}
| Price level | Thread Count | Rate Limit |
|---|---|---|
| Regular | 1 thread | 60/min (1/sec) |
| Bulk | 5 threads | 600/min (10/sec) |
| Super Bulk | 35 threads | 6000/min (100/sec) |
<Response>
<status>
<code>429</code>
<message>Too Many Requests</message>
</status>
<error>
<description>You have reached the maximum allowed requests within the concurrent limit of your account. Please try again later.</description>
</error>
</Response>
{
"code": 429,
"message": "Too Many Requests",
"error": {
"description": "You have reached the maximum allowed requests within the concurrent limit of your account. Please try again later."
}
}
| Price level | Rate Limit |
|---|---|
| Regular | 50/day |
| Bulk | 100/day |
| Super Bulk | 300/day |
<Response> <status> <code>429</code> <message>Too Many Requests</message> </status> <error> <description>Daily quota for the command has been reached. Please try again tomorrow.</description> </error> </Response>
{
"code": 429,
"message": "Too Many Requests",
"error": {
"description": "Daily quota for the command has been reached. Please try again tomorrow."
}
}
