Skip to main content

Getting Started with the DevDraft API (Using Your API Keys)

S
Written by Salifyanji J Namwila
Updated over 2 months ago

Overview

This guide walks you through how to authenticate with the DevDraft API using API keys. You’ll generate your keys, connect them to your application, and test a sample integration using the Product Store.

⚠️ Note: This guide does not cover checkout functionality. If you're looking for payment integration, refer to our Checkout Integration Guide.


🔑 Step 1: Generate Your API Keys

To interact with the DevDraft API, you’ll need a pair of API keys — a Key and a Secret.

  1. Go to your DevDraft Dashboard.

  2. Navigate to App Settings > API Keys.

  3. Click "Create API Key".

  4. A new Key and Secret pair will be created.

    📋 Copy and store your keys securely — the secret will only be shown once.


💻 Step 2: Use Your Keys to Authenticate

Here’s a basic example of how you might use your keys in your application:

Example (Node.js)

const axios = require('axios');

const API_KEY = 'your-key-here';
const API_SECRET = 'your-secret-here';

axios.get('https://api.devdraft.io/products', {
headers: {
'X-API-KEY': API_KEY,
'X-API-SECRET': API_SECRET,
},
}).then(response => {
console.log(response.data);
});

🛡️ Always store secrets in environment variables — never hardcode them in production.


✅ What’s Next?

Once you're successfully fetching data from the API, you can explore other endpoints like:

  • /products

  • /inventory

  • /categories

Check out the full DevDraft API Reference for more.

Did this answer your question?