Hello,
I am trying to generate access tokens for an AEM as a Cloud Service Instance. Found this client lib provided by Adobe that uses Service Credentials to generate Access Tokens. https://github.com/adobe/aemcs-api-client-lib
On executing it, I am getting following error
However, if I extract the JWT from the same response and request access_token via curl, the request is successful.
Requesting guidance on what I might be missing, when executing https://github.com/adobe/aemcs-api-client-lib
Solved! Go to Solution.
Views
Replies
Total Likes
I'm glad that it worked.
Another possible approach would be to download the certificate for the IMS endpoint and enforce nodeJS to use it.
Check if there are any network restrictions on your machine, also check with the newer node version.
You could also open an issue here if it's a generic windows based issue then something needs to be changed there.
https://github.com/adobe/aemcs-api-client-lib
Hi @aanchal-sikka ,
Looks like system specific error, and precisely with NodeJs,
have you checked these threads already (also other related to Nodejs-specific issues)
https://stackoverflow.com/questions/68111460/error-unable-to-get-local-issuer-certificate
FYI,
on my macOs Ventura,
node version - v14.18.0
I am able to retrieve the token.
Also, check if it's not the VPN or some network causing this issue. Sometimes it's a temporary glitch you could also try after some time.
Hope that helps!
Regards,
Nitesh
Thanks for sharing @nitesh_kumar
As you suggested, it is occurring as NodeJS is rejecting invalid/unauthorized certificates.
I was able to resolve this by appending following to index.js
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
I'm glad that it worked.
Another possible approach would be to download the certificate for the IMS endpoint and enforce nodeJS to use it.
Check if there are any network restrictions on your machine, also check with the newer node version.
You could also open an issue here if it's a generic windows based issue then something needs to be changed there.
https://github.com/adobe/aemcs-api-client-lib
Views
Like
Replies