Forum Discussion
I just referred the picture you attached, I guess you should mention grant_type as client_credentials if you have client_id and client_secret. You cannot fetch the access token without providing the client_id and client_secret for the grant_type as client_credentials to the best of my knowledge. Please refer this link for your understanding:-
Hello,
Thank you for the information.
I dont have the client id and client secret. the ready api is executable with the grant type password.
i also referred the docs from here :
https://docs.apigee.com/api-platform/security/oauth/implementing-password-grant-type
Also i tried to execute your code whihc you have shared, but facing an error. added the imports and jar.
This is the line of code showing the error : builder.loadTrustMaterial( trustStrategy);
The method loadTrustMaterial(org.apache.http.ssl.TrustStrategy) in the type SSLContextBuilder is not applicable for the arguments (org.apache.http.conn.ssl.TrustStrategy)
Is it due to version of jar/java?
Thanks for your support.
- avidCoder6 years agoSuper Contributor
Use java_1.8.0_181 version.
Related Content
- 2 years ago