API Integration Helper

Generate code to integrate with third-party APIs

intermediate
codingapiintegrationthird-party

Prompt Template

Write {language} code to integrate with the {api} API.

Goal: {goal}
Auth method: {auth}

Include:
1. Authentication setup
2. API client wrapper with error handling
3. Rate limiting / retry logic
4. TypeScript types for request/response
5. Usage example
6. Environment variable handling

Variables

{language}

Example: TypeScript

{api}

Example: Stripe

{goal}

Example: Create subscriptions and handle webhooks

{auth}

Example: API key

Example Output

```typescript
import Stripe from 'stripe';

const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
...
```

Tips

  • Specify the API version if it matters
  • Include webhook handling if needed

More Prompts