Invalid Credentials for kinde/management-api-js
I have added the management-api-js package to my project and I don't know why but I have that error:
I do have setup my project as told as in the docs so I'm kinda lost
2 Replies
Is this the first time you are using the API or just the management API SDK?
It might be a good idea to just double check a few things:
Enable API Access
First, ensure you've enabled your application's access to the Kinde Management API. You can do this in Kinde by going to Settings > APIs > Kinde Management API and then toggling on your application under the Applications tab.
Authentication Setup
The error message suggests there might be an issue with your authentication credentials. Let's review the correct setup process:
Add a machine-to-machine application for API access and copy the necessary credentials.
Use these credentials to call the Kinde token endpoint. Here's an example in NodeJS: Use the obtained access token to call the Kinde management API: Troubleshooting If you're still encountering the "Invalid credentials" error after following these steps, double-check the following: - Ensure you've correctly copied and pasted your client_id and client_secret. - Verify that your application has the necessary permissions in the Kinde dashboard. - Check that you're using the correct subdomain in your API calls.
Use these credentials to call the Kinde token endpoint. Here's an example in NodeJS: Use the obtained access token to call the Kinde management API: Troubleshooting If you're still encountering the "Invalid credentials" error after following these steps, double-check the following: - Ensure you've correctly copied and pasted your client_id and client_secret. - Verify that your application has the necessary permissions in the Kinde dashboard. - Check that you're using the correct subdomain in your API calls.
IT's working now but found a bug / typo. Using the kinde/management-api-js when retrieving user identities, the response is structured as
But I can't do something like
Because it creates an error : Property 'identities' does not exist on type 'get_identities_response'.