cancel
Showing results for 
Search instead for 
Did you mean: 

How to test a Nodejs application using approuter from postman ?

anmolbhatia003
Participant
0 Kudos
238

Hello Experts',

We are trying to implement a scenario using webhooks from SAP Service Cloud V2 to SAP BTP. I have already created an application using nodejs and axios api to trigger an event or action in sap v2 once event is received in BTP.

This works fine. No issue in the connection.

(please note: BTP application here refers to just handling of logic. I don't need to created any UI to have interaction for the nodejs btp application. It is just to handle some complex logic.)

But problem is the BTP application is being called from V2 without any authentication. I am able to call the same from postman as well it works fine.

Now I have implemented approuter using xsuaa service. The approuter is created and now when I try to access the webhook using approuter it is not working.

Checking through all the blogs, I am unable to identify the correct method of Authentication.

Question and doubts I have:

How can I authenticate the application (as it is not required to have any roles or scopes)

Do i still need to define the scopes and roles in xs-app.json?

Why scopes and roles are needed. I want to authenticate it using just some authentication method. Roles and scopes should be important only when user interaction is involved.

Is there a way, I can setup a simple authentication using a BTP user ?

I am attaching screenshots of important files.

SAP Service Cloud , SAP Sales Cloud , 

@Kinsbrunner 

 

 

 

 

 

Kinsbrunner
Active Contributor
0 Kudos

Hi, I believe you may be missing to obtain the OAuth token.

In episode 10 of my video series I am explaining how to test through Postman for v1 scenarios which I believe should be similar to what you need.

Regards.

Alejandro. 

Accepted Solutions (0)

Answers (0)