Introduction
Welcome to the Dpboss Result API! This guide is designed to be easy for beginners to understand. It will show you how to make secure requests to our API to fetch data. We'll cover:
- Adding special headers to keep your requests secure.
- Sending requests to get the data you need.
- Understanding what the API sends back.
The API uses a simple system to check that only authorized users can access it, keeping your data safe.
API Hostname
All requests start with this base URL:
https://dpbossresultapi.com
To use an endpoint, add its path to this URL. For example, to get data, use https://dpbossresultapi.com/api/data
.
Authentication
Every request needs three headers to prove it's from you:
Header Name | Description |
---|---|
X-API-Key |
Your unique API key (like a username). |
X-Timestamp |
The current time in RFC3339 format (e.g., 2025-06-03T15:01:00Z ). |
X-Signature |
A secure code (HMAC-SHA256) to prove your request is safe. |
Signature Generation
The X-Signature
header is like a password for your request. Here's how to make it:
- Combine these in order:
API_KEY + HTTP_METHOD + REQUEST_PATH + TIMESTAMP
. - Use your API Secret to create an HMAC-SHA256 hash of the combined string.
- Turn the hash into a hexadecimal string.
- Use this as the
X-Signature
header.
This keeps your request secure. Check the code examples below to see how it's done.
Making Requests
To call the API:
- Build the full URL:
https://dpbossresultapi.com/
. - Add the three headers (
X-API-Key
,X-Timestamp
,X-Signature
). - Send the request using a tool like cURL, Fetch, or Axios.
- Check the JSON response you get back.
Example Use Case
Want to fetch all available data? Here's how:
- Method: GET
- Endpoint Path:
/api/data
- Full URL:
https://dpbossresultapi.com/api/data
- Response: A JSON object or array with the data.
Error Handling
If something goes wrong, here's what might happen:
- HTTP Errors:
400
: Something's wrong with your request (e.g., missing headers).401
: Wrong API key or signature.500
: Server issue (try again later).
- Timeouts: If the server takes too long, you'll get an error.
- No Response: Network issues will show in your logs.
- Other Issues: Check your console for error details.
Code Examples
Below are examples in different programming languages to help you get started. Use the tabs to switch between them.
<?php
$apiKey = "YOUR_API_KEY";
$apiSecret = "YOUR_API_SECRET";
$baseUrl = "https://dpbossresultapi.com";
$path = "/api/data";
$method = "GET";
// Get the current time in RFC3339 format (e.g., 2025-06-03T15:01:00Z)
$timestamp = gmdate("Y-m-d\TH:i:s\Z");
// Combine the values to create the message
$message = $apiKey . $method . $path . $timestamp;
// Create the signature using HMAC-SHA256
$signature = hash_hmac('sha256', $message, $apiSecret);
// Set up the headers
$headers = [
"X-API-Key: $apiKey",
"X-Timestamp: $timestamp",
"X-Signature: $signature"
];
// Set up the cURL request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $baseUrl . $path);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_ENCODING, '');
// Send the request and get the response
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// Check for errors
if (curl_errno($ch)) {
echo "Error: " . curl_error($ch);
} else {
echo "HTTP Status: $httpCode\n";
echo "Response:\n$response";
}
curl_close($ch);
?>
const crypto = require('crypto');
const apiKey = 'YOUR_API_KEY';
const apiSecret = 'YOUR_API_SECRET';
const baseUrl = 'https://dpbossresultapi.com';
const path = '/api/data';
const method = 'GET';
// Get the current time in RFC3339 format
const timestamp = new Date().toISOString();
// Combine the values to create the message
const message = apiKey + method + path + timestamp;
// Create the signature using HMAC-SHA256
const signature = crypto.createHmac('sha256', apiSecret)
.update(message)
.digest('hex');
// Set up the headers
const headers = {
'X-API-Key': apiKey,
'X-Timestamp': timestamp,
'X-Signature': signature
};
// Send the request using Fetch
fetch(baseUrl + path, {
method: method,
headers: headers
})
.then(response => {
console.log('HTTP Status:', response.status);
return response.json();
})
.then(data => {
console.log('Response:', JSON.stringify(data, null, 2));
})
.catch(error => {
console.error('Error:', error);
});
const axios = require('axios');
const crypto = require('crypto');
const apiKey = 'YOUR_API_KEY';
const apiSecret = 'YOUR_API_SECRET';
const baseUrl = 'https://dpbossresultapi.com';
const path = '/api/data';
const method = 'GET';
// Get the current time in RFC3339 format
const timestamp = new Date().toISOString();
// Combine the values to create the message
const message = apiKey + method + path + timestamp;
// Create the signature using HMAC-SHA256
const signature = crypto.createHmac('sha256', apiSecret)
.update(message)
.digest('hex');
// Set up the headers
const headers = {
'X-API-Key': apiKey,
'X-Timestamp': timestamp,
'X-Signature': signature
};
// Send the request using Axios
axios.get(baseUrl + path, { headers })
.then(response => {
console.log('HTTP Status:', response.status);
console.log('Response:', JSON.stringify(response.data, null, 2));
})
.catch(error => {
console.error('Error:', error.message);
});
import React, { useState, useEffect } from 'react';
import axios from 'axios';
import crypto from 'crypto-js';
const ApiComponent = () => {
const [responseData, setResponseData] = useState(null);
const [error, setError] = useState(null);
const apiKey = 'YOUR_API_KEY';
const apiSecret = 'YOUR_API_SECRET';
const baseUrl = 'https://dpbossresultapi.com';
const path = '/api/data';
const method = 'GET';
useEffect(() => {
// Get the current time in RFC3339 format
const timestamp = new Date().toISOString();
// Combine the values to create the message
const message = apiKey + method + path + timestamp;
// Create the signature using HMAC-SHA256
const signature = crypto.HmacSHA256(message, apiSecret).toString(crypto.enc.Hex);
// Set up the headers
const headers = {
'X-API-Key': apiKey,
'X-Timestamp': timestamp,
'X-Signature': signature
};
// Send the request using Axios
axios.get(baseUrl + path, { headers })
.then(response => {
setResponseData(response.data);
})
.catch(err => {
setError(err.message);
});
}, []);
return (
Dpboss Result API Data
{error && Error: {error}
}
{responseData ? (
{JSON.stringify(responseData, null, 2)}
) : (
Loading...
)}
);
};
export default ApiComponent;
Contact
Need help? Reach out to our support team at: support@dpboss.net.