cancel
Showing results for 
Search instead for 
Did you mean: 

Error with getting token when executing API call

06-20-2023 12:34 AM
arthurperry3 Discoverer
2461 views 3 comments
0 Likes
SAP Managed Tags
Subscribe

Tutorials: https://developers.sap.com/tutorials/cp-starter-isuite-api-management.html
--------------------------

When following this tutorial, there is a 500 error when getting the auth token via the OAuth access policy. Testing the token endpoint with Postman, I receive

{ "error": "invalid_request", "error_description": "Missing grant type"

}

It is missing the grant_type=client_credentials payload in thegetoauthtoken step. I added the following to the <ServiceCallout>:

<Payload contentType="application/x-www-form-urlencoded">grant_type=client_credentials</Payload>

This eliminates the above error, but I still get a 500 error : An internal server error occured: The MPL ID for the failed message is : AGSQ1x3o51owaNCdcApVRyFI0reA

Any ideas?

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

arthurperry3
Discoverer
0 Likes

com.sap.it.rt.adapter.http.api.exception.HttpResponseException: An internal server error occured: Failure converting a node of class javax.xml.transform.sax.SAXSource: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.. Happening in the Content Modifier step.

Sriprasadsbhat
Active Contributor
0 Likes

Hello Arthur,

Can you goto cloud integration monitoring and see what error you are getting?

The MPL id mentioned in APIM response is from Cloud integration.

Regards,

Sri