Error 400 via the leadCapture/save2 | Community
Skip to main content
Maxime_Toiron
Level 2
October 7, 2019
Question

Error 400 via the leadCapture/save2

  • October 7, 2019
  • 5 replies
  • 6363 views

Hello,

I have a problem when I call my referral webhook. There is an error 400 with th leadCapture/save2. I have this message :

Do you have this problem?

Any ideas here?

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

SanfordWhiteman
Level 10
October 7, 2019

  formid

is all lower case.

Maxime_Toiron5
Level 1
October 7, 2019

Thanks Sandford!

I tried in lower case and I've the same problem:

Here is my setting for the webhook:

Thanks

SanfordWhiteman
Level 10
October 7, 2019

Actually the whole approach is wrong, now that I'm more awake... /save2 is an x-www-form-urlencoded endpoint.

Steven_Vanderb3
Adobe Employee
Adobe Employee
October 7, 2019

I'd guess your {{my.referralFormID}} token is not resolving with a valid value.

Maxime_Toiron
Level 2
October 7, 2019

Thanks @Sanford Whiteman‌, but actually what would be the right approach?

Thanks @Steven Vanderberg‌. My referral form id works.

SanfordWhiteman
Level 10
October 7, 2019

Your POST should be a standard URL-encoded form payload. Not JSON. Just like the client library sends.

Maxime_Toiron
Level 2
October 7, 2019

Thanks @Sanford Whiteman‌,

But I have already tested Request Token Encoding types and still doesn't work.

SanfordWhiteman
Level 10
October 7, 2019

It's not only about the encoding of individual fields.

The forms /save and /save2 endpoints accept form-like POST payloads (i.e. like a query string k=v&k2=v2&k3=v3). You're trying to send JSON. This is totally different.

Format your payload correctly and use Form/Url encoding.