I'm trying to invoke an OAuth 2.0–protected REST API from an Oracle SOA Suite 12c BPEL process. The first step is to fetch the access token using the client_credentials
grant type. However, I'm consistently getting the following error from the token endpoint:
{
"errors": [
{
"code": "OBJECT_REQUIRED",
"dataPath": "",
"message": "Missing required property: grant_type"
}
]
}
-
Endpoint: https://api.smartrecruiters.com/identity/oauth/token
-
Method: POST
-
Headers:
Content-Type: application/x-www-form-urlencoded
-
Request Body:grant_type=client_credentials&client_id=xxxxx&client_secret=yyyyy
-
Sent the request body as a string
variable in BPEL
-
Mapped the payload to the input of a REST Adapter
Can you please help me with How to properly send application/x-www-form-urlencoded
data from BPEL using REST Adapter?