Core ConceptsAuthentication
Core Concepts

Authentication

Learn how to authenticate with Mentor3.ai APIs

curl -X GET "https://api.mentor3.ai/v1/courses" \
-H "Authorization: Bearer YOUR_API_KEY"

API Authentication Overview

Mentor3.ai uses OAuth 2.0 and API keys for secure access to our learning platform APIs. Authentication ensures that only authorized users and applications can access protected resources. We support multiple authentication methods to accommodate different integration scenarios.

All API requests must include valid authentication credentials to prevent unauthorized access.

Authentication Methods

Use API keys for server-to-server communication.

path
api_keystring
Required

Your unique API key obtained from the dashboard.

Token Management

Access tokens have a limited lifespan for security. Implement token refresh logic to maintain continuous API access.

Security Best Practices

Never expose API keys or tokens in client-side code. Use environment variables or secure key management systems.

Troubleshooting Authentication Issues

Common authentication problems and their solutions:

IssueSymptomSolution
Invalid Token401 UnauthorizedRefresh or re-authenticate
Rate Limited429 Too Many RequestsImplement backoff strategy
Expired Key403 ForbiddenGenerate new API key
If you suspect your credentials have been compromised, revoke them immediately and generate new ones.

Integration Examples

Here's how to authenticate in different programming environments:

const authenticate = async (apiKey) => {
const response = await fetch('/api/user/profile', {
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  }
});

if (!response.ok) {
  throw new Error('Authentication failed');
}

return response.json();
};

For additional support with authentication, refer to our API documentation or contact the developer support team.

Was this page helpful?
Built with Documentation.AI

Last updated 4 days ago