Have you been able to test your connection with Postman fine?
It looks like you're encountering an error when trying to use the Kinde Users API. The error message "Response returned an error code" suggests that the request to the Kinde API is not being processed as expected. This could be due to several reasons, such as incorrect API credentials, insufficient permissions, or an issue with the request format.
Here are a few steps you can take to troubleshoot and resolve the issue:
Check API Credentials: Ensure that your Kinde API credentials (Client ID, Client Secret, and Kinde Domain) are correctly configured in your environment. These credentials are essential for authenticating your requests to the Kinde API.
Verify Permissions: Make sure that the API client you're using has the necessary permissions to access the Users API. You might need to review the permissions assigned to your API client in the Kinde dashboard.
Request Format: Double-check the request format, including headers and any required parameters. The Kinde API expects the content-type of the request to be in JSON format. Ensure that your request adheres to the expected format as outlined in the Kinde API documentation.
API Endpoint: Verify that you're calling the correct API endpoint. The endpoint for retrieving users is typically structured as
https://{your_kinde_domain}.kinde.com/api/v1/users. Replace {your_kinde_domain} with your actual Kinde domain.
Error Handling: Implement error handling in your code to catch and log any errors returned by the Kinde API. This can provide more insight into what might be causing the issue.
Kinde Documentation: Review the Kinde API documentation for any specific requirements or examples related to using the Users API. The documentation might offer additional insights or examples that could help resolve the issue.