@sriram_1 - Is there any specific error you are facing while programmatically accessing AEMaaCS using Service Credentials?
Also, where exactly the error is seen?
1. Calling AEM Cloud for JWT? or
2. Calling AEM Cloud for access token using JWT?
Please check this link as well on how to connect using node JS: https://www.npmjs.com/package/@adobe/jwt-auth
- Jineet