hello,
I use oauth2 - client credentials to connect to datasource with auth restful api ,Execution failed with status 4000:
Invalid authentication credentials. Please check datasource configuration.
I cannot find why, i have tested basic auth method by user/pass, it’s ok .
Can any friend give me some suggest, thanks!
platform: self-hosting , docker deploy
connecting to db by rest api : oracle ords server , running on host machine, appsmith is running on docker
Hello and welcome to our community!
Can you share a screenshot of your datasource configuration (you can redact sensitive information)?
Does the API run successfully in other tools such as Postman?
To clarify my previous answer a bit, the bug report describes a problem with Appsmith passing the auth token which is being investigated by the team, your issue might be related, but it seems your case is loosely related to the bug report that he investigates it. Realizing that it sounds like your problem is a misconfiguration, I might suggest the following:
Make sure your Access Token URL is correct, as well as all settings.
in Authentication Type, if i select bearer token , and input a static token, api call success. from appsmith to api server has no problem . I also use basic user/pass method, has no problem too . I feel Access Token URL is also no problem. why client credential does not work , it still confused me .
I can recommend that you try two things and let me know if this fixes your problem.
update Appsmith to the latest version, you can follow this guide: Docker | Appsmith
the token URL you pass contains a private IP Appsmith doesn’t have access to it, so it fails, you could try using Ngrok to expose the port you want: https://ngrok.com/