Troubleshooting

This guide helps you troubleshoot common issues you might encounter when integrating with iiniit's platform.

Authentication Issues

Invalid Client Error

If you receive an "invalid_client" error during OAuth2 authentication, it usually means there's an issue with your client credentials.

Possible causes:

  • Incorrect client ID or client secret
  • Client application not registered or deactivated
  • Mismatched redirect URI

Solution:

  1. Verify your client ID and secret are correct
  2. Check that your application is active in the developer dashboard
  3. Ensure the redirect URI matches exactly what you registered

Access Token Expired

If your API requests fail with a 401 Unauthorized error and a message about an expired token, your access token has expired.

Solution:

  1. Use the refresh token to obtain a new access token
  2. If the refresh token is also expired, initiate a new authentication flow

Example code:

// Example: Refreshing an expired token
async function refreshAccessToken(refreshToken) {
  const response = await fetch('https://www.iiniit.com/api/oauth2/authorize', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Basic ${btoa('YOUR_CLIENT_ID:YOUR_CLIENT_SECRET')}`
    },
    body: JSON.stringify({
      grant_type: 'refresh_token',
      refresh_token: refreshToken
    })
  });
  
  return await response.json();
}

API Request Issues

Rate Limiting

If you receive a 429 Too Many Requests error, you've exceeded the rate limits for our API.

Solution:

  1. Implement exponential backoff and retry logic
  2. Check the response headers for rate limit information

Invalid Request Parameters

If you receive a 400 Bad Request error, there might be an issue with your request parameters.

Possible causes:

  • Missing required parameters
  • Invalid parameter values
  • Incorrect data format

Solution:

  1. Check the API documentation for required parameters
  2. Validate parameter values before sending the request
  3. Ensure you're using the correct content type

Common Error Codes

Error Code Description Solution
invalid_request The request is missing a required parameter or is otherwise malformed Check the request parameters and format
invalid_client Client authentication failed Verify client credentials
invalid_grant The provided authorization grant is invalid, expired, or revoked Obtain a new authorization grant
unauthorized_client The client is not authorized to use this grant type Check client permissions or use a different grant type
unsupported_grant_type The authorization grant type is not supported Use a supported grant type
invalid_scope The requested scope is invalid, unknown, or malformed Check and correct the requested scope
server_error The server encountered an unexpected error Retry the request or contact support

Getting Help

If you're still experiencing issues after trying the troubleshooting steps above, you can get help through the following channels:

  • Contact us - Reach out to our support team for assistance with your issue

Need Immediate Assistance?

For urgent issues affecting your production environment, contact our priority support:

[email protected]