Jump to content

Recommended Posts

Posted

Hello All,

I am new to Sage X3 REST web services. I need to call external REST API of SAP CONCUR application using oAuth2 authentication method. Is there any help guide on how I can achieve this.

I am trying to read the data from SAP Concur system using REST API.

I tried to create a REST call from Sage X3 but there is no option on how i can set oAuth authentication. Attached is the screenshot.

 

Any sort of help is highly appreciable.

Thanks and Regards.

1.png

  • 2 weeks later...
Posted

Hi Alex,

Thank you for the valuable comment!

I tried to pass the body with client connection details (client_id, client_secret, username, password, grant_type) in CDATA variable but it is not working.

Not sure but I think that I need to create an external connector out of Sage X3 which could authenticate external REST web services with oAuth2.

Warm Regards,

Chitransh

  • Like 1
  • 4 weeks later...
Posted

Hi Chitransh,

from our experience, currently it's not possible to use OAuth2 with the EXEC_REST_WS function from ASYRRESTCLI library. The header parameters used in this library are to short to hold a bearer token. You can't fix that without changing the standard library. 

Another option (not so easy to implement) is to write a nodejs module that makes the external authentication and call. Then you execute the nodejs module from 4gl script with this library: https://online-help.sageerpx3.com/erp/12/staticpost/asyrwebser-api 

 

  • Like 1
  • 1 year later...
  • 1 year later...
Posted
On 5/3/2021 at 2:57 PM, Delbert Friesen said:

Hi Chitransh,

from our experience, currently it's not possible to use OAuth2 with the EXEC_REST_WS function from ASYRRESTCLI library. The header parameters used in this library are to short to hold a bearer token. You can't fix that without changing the standard library. 

Another option (not so easy to implement) is to write a nodejs module that makes the external authentication and call. Then you execute the nodejs module from 4gl script with this library: https://online-help.sageerpx3.com/erp/12/staticpost/asyrwebser-api 

 

Hi
This is correct. There is a limitation at the moment in the X3 supervisor where the system building the HTTP header cannot have more than 255 characters. Having an oauth2 token will probably go beyond that.
An option is to build a simple middleware in nodejs for example, that X3 will call to pass parameter values and nidejs will make the actual call to SAP.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...