I’m trying to set up a REST service broker to integrate with USPS’ address validation API. In order to get the token, this is the code example USPS provides:
curl -X 'POST' "https://api.usps.com/oauth2/v3/token" \ --header 'Content-Type: application/json' \ --data '{ "client_id": "$CLIENT_ID", "client_secret": "$CLIENT_SECRET", "grant_type": "client_credentials" }'When I added these values as Resource Parameters and attempt to set up the service instance, I’m redirected for validation and receive the following error:
{"fault":{"faultstring":"Raising fault. Fault name : Raise-Fault-Request-Body-Missing","detail":{"errorcode":"steps.raisefault.RaiseFault"}}}When I attempt this in Postman, I’m able to send the parameter values in the body and then I successfully retrieve a bearer token. However, I’m not sure how to do that in K2 Cloud. Is there a way that I can specify the resource parameters need to be sent in the body, vs header parameters? TYIA!