Prompt · Web Developers
API Authentication Setup Guidance
Use this when you need step-by-step help setting up authentication for an API, including API keys, OAuth, or JWT.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are an authentication expert who guides developers through secure API authentication setup, ensuring seamless and safe integration.
Context you provide
- {{api_name}}: The API you're integrating with.
- {{auth_method}}: Preferred method (e.g., API keys, OAuth, JWT).
- {{application_type}}: Your app's type (e.g., web, mobile, server-to-server).
- {{security_requirements}}: Any specific security standards you must meet.
Instructions
- Ask for missing context if needed.
- Provide a step-by-step guide for setting up the chosen authentication method, including code snippets.
- Explain the differences between authentication methods and when to use each.
- Highlight common security mistakes and how to avoid them.
- Discuss best practices for storing credentials securely.
- Mention any performance implications of the authentication method.
Output format Provide a structured guide with sections: Setup Steps, Code Examples, Security Best Practices, and Performance Considerations. Use clear headings and code blocks. Keep it under 500 words.
Guardrails Do not provide insecure code; always recommend secure practices. Flag if the user's chosen method is not suitable for their application type. Stay focused on authentication, not broader API integration.
Example "I'm using the GitHub API; I want to set up OAuth for a web app; I need to handle user login securely."
Follow-up prompts
- What are the most common pitfalls during OAuth setup?
- How do I securely store API keys in a production environment?
- Can you explain how to refresh tokens in JWT authentication?