File contents Third-Party Integration
Table of Contents
Overview
Build robust integrations with external services using standardized patterns for API calls, error handling, authentication, and data transformation.
When to Use
Integrating payment processors (Stripe, PayPal)
Using messaging services (SendGrid, Twilio)
Connecting to analytics platforms (Mixpanel, Segment)
Syncing with storage services (AWS S3, Google Cloud)
Integrating CRM systems (Salesforce, HubSpot)
Building multi-service architectures
Quick Start
Minimal working example:
const axios = require("axios");
class ThirdPartyClient {
constructor(config) {
this.apiKey = config.apiKey;
this.baseUrl = config.baseUrl;
this.timeout = config.timeout || 30000;
this.retryAttempts = config.retryAttempts || 3;
this.retryDelay = config.retryDelay || 1000;
this.client = axios.create({
baseURL: this.baseUrl,
timeout: this.timeout,
headers: {
Authorization: `Bearer ${this.apiKey}`,
"Content-Type": "application/json",
},
});
}
async request(method, endpoint, data = null, options = {}) {
let lastError;
for (let attempt = 0; attempt < this.retryAttempts; attempt++) {
try {
const response = await this.client({
// ... (see reference guides for full implementation)
Reference Guides
Detailed implementations in the references/ directory:
Guide
Contents
Third-Party Client Wrapper
Third-Party Client Wrapper
Payment Processor Integration (Stripe)
Payment Processor Integration (Stripe)
Email Service Integration (SendGrid)
Email Service Integration (SendGrid)
Python Third-Party Integration
Python Third-Party Integration
Data Transformation
Data Transformation
Best Practices
✅ DO
Implement retry logic with exponential backoff
Validate webhook signatures
Log all API interactions
Use environment variables for secrets
Transform API responses to internal models
Implement circuit breakers for critical services
Monitor API quota and rate limits
Add proper error handling
Use timeouts appropriately
Test with sandbox/test API keys
❌ DON'T
Hardcode API keys
Retry all errors indefinitely
Log sensitive data
Trust unvalidated webhook data
Ignore rate limits
Make synchronous blocking calls
Expose vendor-specific details to clients
Skip error handling
Use production keys in tests
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1 --- 2 name: aj-geddes-useful-ai-prompts-third-party-integration 3 description: Third-Party Integration 4 --- 5 6 # Third-Party Integration 7 8 ## Table of Contents 9 10 - [Overview](#overview) 11 - [When to Use](#when-to-use) 12 - [Quick Start](#quick-start) 13 - [Reference Guides](#reference-guides) 14 - [Best Practices](#best-practices) 15 16 ## Overview 17 18 Build robust integrations with external services using standardized patterns for API calls, error handling, authentication, and data transformation. 19 20 ## When to Use 21 22 - Integrating payment processors (Stripe, PayPal) 23 - Using messaging services (SendGrid, Twilio) 24 - Connecting to analytics platforms (Mixpanel, Segment) 25 - Syncing with storage services (AWS S3, Google Cloud) 26 - Integrating CRM systems (Salesforce, HubSpot) 27 - Building multi-service architectures 28 29 ## Quick Start 30 31 Minimal working example: 32 33 ```javascript 34 const axios = require("axios"); 35 36 class ThirdPartyClient { 37 constructor(config) { 38 this.apiKey = config.apiKey; 39 this.baseUrl = config.baseUrl; 40 this.timeout = config.timeout || 30000; 41 this.retryAttempts = config.retryAttempts || 3; 42 this.retryDelay = config.retryDelay || 1000; 43 this.client = axios.create({ 44 baseURL: this.baseUrl, 45 timeout: this.timeout, 46 headers: { 47 Authorization: `Bearer ${this.apiKey}`, 48 "Content-Type": "application/json", 49 }, 50 }); 51 } 52 53 async request(method, endpoint, data = null, options = {}) { 54 let lastError; 55 56 for (let attempt = 0; attempt < this.retryAttempts; attempt++) { 57 try { 58 const response = await this.client({ 59 // ... (see reference guides for full implementation) 60 ``` 61 62 ## Reference Guides 63 64 Detailed implementations in the `references/` directory: 65 66 | Guide | Contents | 67 |---|---| 68 | [Third-Party Client Wrapper](references/third-party-client-wrapper.md) | Third-Party Client Wrapper | 69 | [Payment Processor Integration (Stripe)](references/payment-processor-integration-stripe.md) | Payment Processor Integration (Stripe) | 70 | [Email Service Integration (SendGrid)](references/email-service-integration-sendgrid.md) | Email Service Integration (SendGrid) | 71 | [Python Third-Party Integration](references/python-third-party-integration.md) | Python Third-Party Integration | 72 | [Data Transformation](references/data-transformation.md) | Data Transformation | 73 74 ## Best Practices 75 76 ### ✅ DO 77 78 - Implement retry logic with exponential backoff 79 - Validate webhook signatures 80 - Log all API interactions 81 - Use environment variables for secrets 82 - Transform API responses to internal models 83 - Implement circuit breakers for critical services 84 - Monitor API quota and rate limits 85 - Add proper error handling 86 - Use timeouts appropriately 87 - Test with sandbox/test API keys 88 89 ### ❌ DON'T 90 91 - Hardcode API keys 92 - Retry all errors indefinitely 93 - Log sensitive data 94 - Trust unvalidated webhook data 95 - Ignore rate limits 96 - Make synchronous blocking calls 97 - Expose vendor-specific details to clients 98 - Skip error handling 99 - Use production keys in tests 100 101 --- 102 > Converted and distributed by [TomeVault](https://tomevault.io/claim/aj-geddes) — claim your Tome and manage your conversions. 103 <!-- tomevault:4.0:skill_md:2026-04-11 -->
tomevault-io/skills-registry/tree/main/aj-geddes--useful-ai-prompts--third-party-integration commit 682130d45f
Frequently asked questions How do I install the Aj Geddes Useful AI Prompts Third Party Integration skill? Run npx skillmds@latest add tomevault-io/aj-geddes-useful-ai-prompts-third-party-integration in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Aj Geddes Useful AI Prompts Third Party Integration skill do? Third-Party Integration It is listed under Integrations & APIs on SkillMD.
Is Aj Geddes Useful AI Prompts Third Party Integration safe to use? This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Aj Geddes Useful AI Prompts Third Party Integration? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Aj Geddes Useful AI Prompts Third Party Integration free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Aj Geddes Useful AI Prompts Third Party Integration? tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.