third-party-integration

Implement OAuth flows, webhook verification, and idempotent event handling for third-party API integrations.

1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill third-party-integration-kalilurrahman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: third-party-integration
Source: https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts/tree/main/08-api-integration/third-party-integration
Command: npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill third-party-integration-kalilurrahman

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, fastapi, prometheus-client.

What problem does it solve? Integrating with external services like Stripe, GitHub, or Slack is risky: APIs change, webhooks get redelivered, rate limits get hit, and tokens expire. This Skill provides production patterns for building resilient, verifiable, and replaceable third-party integrations. ## Core Features & Use Cases - OAuth 2.0 with PKCE: Implements the authorization code flow with PKCE, state validation, token refresh, and FastAPI callback routes for providers like GitHub and Google. - Secure Webhook Handling: Verifies Stripe and GitHub webhook signatures with HMAC-SHA256, rejects stale timestamps, and processes events idempotently in background tasks. - Rate Limit Aware Clients: Provides an async API client with client-side throttling, 429 retry handling, and rate limit quota logging. - Use Case: You need to accept Stripe payments and sync GitHub repositories. Use this Skill to generate the OAuth connection flow, a signature-verified webhook endpoint that safely handles duplicate payment events, and health monitoring for both integrations. ## Quick Start Use the third-party-integration skill to build a Stripe webhook endpoint with signature verification and idempotent event processing.

Frequently Asked Questions about third-party-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify Stripe webhook signatures in Python?

Verify Stripe webhook signatures by computing HMAC-SHA256 over the timestamp and raw payload using your webhook secret, then comparing with the v1 value in the Stripe-Signature header using hmac.compare_digest. Reject timestamps older than 5 minutes to prevent replay attacks.

How to implement OAuth 2.0 authorization code flow with PKCE in FastAPI?

Generate a code verifier and SHA-256 challenge, redirect the user to the provider's authorization URL with the challenge and a state token, then exchange the returned code along with the verifier at the token endpoint. Store the state-to-verifier mapping in Redis or the session for validation.

Why should webhook handlers be idempotent?

Webhook providers like Stripe guarantee redelivery when they do not receive a 2xx response, so the same event can arrive multiple times. Idempotent handlers check an event ID store before processing and skip already-processed events, preventing duplicate charges or state changes.

How do I handle API rate limits when calling third-party services?

Apply client-side throttling by tracking request timestamps and sleeping when the per-second quota is reached. On a 429 response, read the Retry-After header, wait that duration, and retry, while logging X-RateLimit-Remaining to warn before limits are exhausted.

Should webhook processing happen synchronously in the request handler?

No, return 200 immediately and process the event in a background task. Providers like Stripe retry for up to 3 days if they do not receive a 2xx within 30 seconds, so slow synchronous handlers cause retry storms and duplicate deliveries.