0

I was configuring external credentials in Salesforce, but I noticed, there's no Custom Body on it, is there any way to add it using OAuth 2.0 Authentication Protocol? I'm only seeing Custom Headers but there's no Custom Body. Thanks enter image description here

1 Answer 1

1

If you select "Pass client credentials in request body" in the External Credential, then any headers will be passed as a "application/x-www-form-urlencoded" body, including the Client ID and Secret from the Principal and any custom headers you define -- see example screenshot below using a Named Credential and External Credential to authenticate with PandaDoc.

Here's another relevant thread.

enter image description here

3
  • Upvoted your answer for mentioning an important nuance. The question is vague and may not mean what you think it means. (The term "Custom Body" makes no sense in oAuth). As for your answer - application/x-www-form-urlencoded encoding is going to be used by EC/NC for the request body regardless of whether you check the Pass creds in body option. The option controls how the creds are stuffed into the request: via Authorization header or in body.
    – identigral
    Commented Oct 5, 2023 at 16:20
  • 1
    We updated our Q&A to cover this. Thanks for the nudge!
    – identigral
    Commented Oct 5, 2023 at 17:38
  • We tried to use the answer above, selecting the 'Pass client credentials in request body', but it does not seem that the custom headers(outside of client creds) are sent in the request body.
    – shahar1980
    Commented Mar 12 at 7:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .