Forum Discussion
Hello,
I dont have to sent client id and secret key in my api request.
the api call works fine in postman without client id and secret key.
the api call needs only grant type, user name, pwd to be send as body or header part. content type must be form-data-url encoded.i have attached the image of post man of the request reference.
Is it possible to get the access token without client key and secret as my cuctomer didnt share anything.
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:-
- ashrey7 years agoNew Contributor
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.
- avidCoder7 years agoSuper Contributor
Use java_1.8.0_181 version.
Related Content
- 2 months ago
Recent Discussions
- 4 hours ago
- 17 days ago