Hi All, I am looking for some guidance with HTTP Connector. I am trying to connect using HTTP Connector with OAuth 2.0 client credentials but I don't see a way to pass audience claim(I see option for scope only). Does anyone have tried passing audience claim(in the request body or as a param) with HTTP Connector?
we cant currently support this right now in one step. you could create a SDK connector with this supported in the auth or the other workaround would be to build the OAuth flow in recipe steps. something like below. doing it this way should work with the main drawback being you then have to manage the refresh. you can do that storing it in a property and using another recipe.
- HTTP connector Connection type set to None or Header auth (not OAuth2 client credentials)
- First HTTP action does a raw POST to the token endpoint. Full control over body, so you add audience alongside client_id, client_secret, grant_type
- Parse access_token out of the JSON response
- Pass that token as a Bearer header on your actual API call actionThanks, Richy. This is the approach I have followed for now, but I was expecting the HTTP connector to provide a standard field for this like scope, especially since most customers are moving toward JWT-based formats with OAuth 2.0