# API call error "missing parameter" but works in postman

**URL:** <https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473>\
**Category:** Need help\
**Created:** [November 9, 2023, 7:39pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473 "2023-11-09T19:39:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![manager4](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manager4](https://forum.bubble.io/u/manager4)\
**Post date:** [November 9, 2023, 7:39pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/1 "2023-11-09T19:39:40Z")

</div>

I need help with structuring a bubble API call. I tried this manual work flow guide.  
[[Showcase] Manual OAuth2 Token Integration - Showcase - Bubble Forum](http://forum.bubble.io/t/showcase-manual-oauth2-token-integration/79988)  
Thank you @  
ambroisedlg for taking the time!  
I have a cURL that works great to obtain an access\_token when used with postman. Not that it matters but I am integrating with Square. The cURL works fine with Square API explorer too so I know the headers and parameters function, are in the correct order and syntax is all good.

Problem is bubble API initialization yields error “missing parameter”. I tried manual Oauth as well as Oauth2 custom\_token(autoflow). Regardless I get the same missing parameter message. “client\_id” is missing.

Here is the json body below. Have tried manually defining parameters and also tried using them in the json body. Either way I get the error. I am using static data for testing. And yes I am using new a “code” with each token request to make sure access is granted. Works great in postman.  
{  
“grant\_type”: “authorization\_code”,  
“client\_id”: “_**-IYz\_WyFdiiPKQN45lqdquQ",  
“redirect\_uri”: “https://\*\*\*\*\*\*\*\*.bubbleapps.io/version-test/oauth”,  
“short\_lived”: false,  
“code”: "**_-OZW45otfdUaVE5lNRxRJvA”,  
“client\_secret”: “\*\*\*\*\*\*\*\*Mm4hZc3HBtQBGVHzSXKjcpbG7GFT9B2IJw98pCP7w”,  
“scopes”: [  
“ITEMS\_READ”  
]  
}

---

<div class="post-metadata">

**Author:** ![ambroisedlg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ambroisedlg/32/61966_2.png) [@ambroisedlg](https://forum.bubble.io/u/ambroisedlg)\
**Post date:** [November 9, 2023, 9:11pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/2 "2023-11-09T21:11:26Z")

</div>

Hey @manager4 - glad that thread could help you!

I noticed that there may be a small formatting error in your JSON body you pasted:

> [@manager4](#):
>
> “client\_id”: “_ **-IYz\_WyFdiiPKQN45lqdquQ",** _

Notice the ending `"` is not exactly the same as the other unquotes, which are `”`

As a starting point I would suggest replacing that ending one by the same one as the other unquotes. Let me know if that resolves the issue

Ambroise

---

<div class="post-metadata">

**Author:** ![manager4](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manager4](https://forum.bubble.io/u/manager4)\
**Post date:** [November 9, 2023, 11:57pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/3 "2023-11-09T23:57:32Z")

</div>

Not sure why it pasted like that in bold. Looks correct in bubble. Thanks for having a keen eye.  
Here is the json body again:-  
{  
“grant\_type”: “authorization\_code”,  
“client\_id”: “s_**IYz\_WyFdiiPKQN45lqdquQ",  
“redirect\_uri”: "[https://k](https://k)**.bubbleapps.io/version-test/oauth",  
“short\_lived”: false,  
“code”: "B_\*\*\*\*\*\*\*W45otfdUaVE5lNRxRJvA”,  
“client\_secret”: “H\*\*\*\*htQBGVHzSXKjcpbG7GFT9B2IJw98pCP7w”,  
“scopes”: [  
“ITEMS\_READ”  
]  
}

Also validated the json body. Its good and works in postman. Not sure what’s throwing the “missing parameter client\_id” error.

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [November 10, 2023, 11:27am UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/4 "2023-11-10T11:27:20Z")

</div>

See if it helps:

> [@\[Upgrade to Bubble Version 25\] Giving all external API calls a default user agent if they don't already have one set](http://forum.bubble.io/t/upgrade-to-bubble-version-25-giving-all-external-api-calls-a-default-user-agent-if-they-dont-already-have-one-set/271309):
>
> Hello everyone, We just released a new Bubble version that gives all external API calls a User-Agent field. This field will let the receiver of the API call know that the call originated from Bubble. All API calls without a custom User-Agent field going forward will now have a “User-Agent”: “Bubble” field attached as a header. The primary reason we’re making this change relates to partnerships. As we ramp up our partnernship efforts, partners being able to identify API calls coming from Bubble…

Can you share the endpoint URL?

---

<div class="post-metadata">

**Author:** ![manager4](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manager4](https://forum.bubble.io/u/manager4)\
**Post date:** [November 10, 2023, 3:57pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/5 "2023-11-10T15:57:25Z")

</div>

The endpoint URL is below. I have tried multiple auth flows including self-handled, user-agent etc. Same error “missing parameter client\_id”. If I make any call GET, POST etc from bubble to Square I get the same error.  
It seems to be some kind of bubble parsing issue. It’s frustrating not being able to see how bubble structures the outbound call/raw data. How do I debug what I can’t see? cURL works within Square’s API explorer and Postman so the parameter is not “missing” it must be something else within bubble. Here is the working cURL(with dummy codes):-

curl [https://connect.squareup.com/oauth2/token](https://connect.squareup.com/oauth2/token)   
-X POST   
-H ‘Square-Version: 2023-10-18’   
-H ‘Content-Type: application/json’   
-d ‘{  
“grant\_type”: “authorization\_code”,  
“client\_id”: “wien56nthyiIYz\_WyFdiiPwn875lqdquQ”,  
“redirect\_uri”: “[https://wantjrnt.bubbleapps.io/version-test/oauth](https://wantjrnt.bubbleapps.io/version-test/oauth)”,  
“short\_lived”: false,  
“code”: “29nghti9-dUaVE5lNRxAgRT”,  
“client\_secret”: “nbjg85jndk94jfcpbG7GFT9B2IJw98pCP7w”,  
“scopes”: [  
“ITEMS\_READ”  
]  
}’  
I receive both the access\_token and refresh\_token just fine using cURL.  
I tried URL encoding the json body and changing the content\_type to match. Unsuccessful.

“client\_id” parameter is necessary for all my calls. I am the “client” and that is my identifier.

---

<div class="post-metadata">

**Author:** ![ambroisedlg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ambroisedlg/32/61966_2.png) [@ambroisedlg](https://forum.bubble.io/u/ambroisedlg)\
**Post date:** [November 10, 2023, 5:31pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/6 "2023-11-10T17:31:47Z")

</div>

@manager4 have you tried adding all these values as parameters instead of passing them as a JSON body? Screenshot below is unrelated to Square but just to illustrate what I mean:

 ![CleanShot 2023-11-10 at 10.30.52@2x](https://us1.discourse-cdn.com/bubble/original/3X/0/4/040d906eb0ef9fbd0a302d169398e9a598c18ce7.png)

---

<div class="post-metadata">

**Author:** ![manager4](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manager4](https://forum.bubble.io/u/manager4)\
**Post date:** [November 11, 2023, 3:05pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/7 "2023-11-11T15:05:41Z")

</div>

Yes have tried that too. I tried:-

1. Adding parameter values only.
2. json body only.
3. Both json body and adding parameters.
4. URL encoding and changing the content\_type to match.

I’ve checked spelling, spaces, syntax, validated the json and tested cURL with postman and Square’s API explorer. Everything is fine except when the call is sent from bubble.

I have scoured bubble docs and forums. Even GPT4 is like “its a bubble glitch of some kind”

Have cleared cache, rebuilt the call a dozen times. No love.

---

<div class="post-metadata">

**Author:** ![manager4](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manager4](https://forum.bubble.io/u/manager4)\
**Post date:** [November 11, 2023, 3:57pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/8 "2023-11-11T15:57:01Z")

</div>

Sent the bubble call to requestbin. Looks like only one header is being transmitted “content\_type”

 ![Screenshot 2023-11-11 055032](https://us1.discourse-cdn.com/bubble/original/3X/b/7/b70fc41f2ebe4e6374d29fe2504dab562619b234.png)  
No data at all being sent. I will play around sending to requestbin.

---

<div class="post-metadata">

**Author:** ![manager4](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manager4](https://forum.bubble.io/u/manager4)\
**Post date:** [November 11, 2023, 4:13pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/9 "2023-11-11T16:13:46Z")

</div>

I just sent cURL from postman to requestbin. All parameters received.  
So yeah this is definitely a bubble issue.

---

<div class="post-metadata">

**Author:** ![tiboricus](https://avatars.discourse-cdn.com/v4/letter/t/ce7236/32.png) [@tiboricus](https://forum.bubble.io/u/tiboricus)\
**Post date:** [November 11, 2023, 4:30pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/10 "2023-11-11T16:30:18Z")

</div>

Would you please post a screenshot of the setup of your API call in the Bubble API plugin?

---

<div class="post-metadata">

**Author:** ![ambroisedlg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ambroisedlg/32/61966_2.png) [@ambroisedlg](https://forum.bubble.io/u/ambroisedlg)\
**Post date:** [November 11, 2023, 4:52pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/11 "2023-11-11T16:52:27Z")

</div>

@manager4 I got curious and tried on my end - this request works for me and returns an access token and refresh token amongst other things:

 ![CleanShot 2023-11-11 at 09.51.16@2x](https://us1.discourse-cdn.com/bubble/original/3X/f/6/f607f7ae5d9803a07b840cbe172aa179a09ceda2.png)

---

<div class="post-metadata">

**Author:** ![tiboricus](https://avatars.discourse-cdn.com/v4/letter/t/ce7236/32.png) [@tiboricus](https://forum.bubble.io/u/tiboricus)\
**Post date:** [November 11, 2023, 5:03pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/12 "2023-11-11T17:03:53Z")

</div>

From the list of “Body parameters” the client\_id is missing. (And it is not in the “Parameters” section either). It is not getting passed on to your API. Also, when I build the Json body, I use the parameter name between the \<\>. Then the “Body parameters” section will automatically be filled with the necessary parameters, so you won’t miss any and wouldn’t have to manually add them.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/c/4/c42d46e6d5af4e096da1629412dde02872e18bd3.jpeg)

---

<div class="post-metadata">

**Author:** ![manager4](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manager4](https://forum.bubble.io/u/manager4)\
**Post date:** [November 12, 2023, 4:35pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/13 "2023-11-12T16:35:28Z")

</div>

@ambroisedlg I see how the parameter name between the \<\>works. Thank you! I thought \<\> were for dynamic values. Did not realize \<\> also builds the “body parameters” keys below it.  
Here is my call:-

 ![Screenshot 2023-11-11 191714](https://us1.discourse-cdn.com/bubble/original/3X/d/9/d92d748dab7f48c028a201b1f57f48919bc61cfe.png)  
 ![Screenshot 2023-11-11 191833](https://us1.discourse-cdn.com/bubble/original/3X/f/b/fb36acd55b67b68e5cef0891d648d16037404a80.png)

When I send it to request bin “client\_id” is being passed

 ![Screenshot 2023-11-12 054548](https://us1.discourse-cdn.com/bubble/original/3X/8/0/80459f5a7028022e2103bbd62b0657e20c7280fe.png)

When I send to Square i still get the dreaded error

 ![Screenshot 2023-11-12 055804](https://us1.discourse-cdn.com/bubble/original/3X/6/a/6a0db1789803099ba02a89bd46d7eae66939bf2d.png)

---

<div class="post-metadata">

**Author:** ![manager4](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manager4](https://forum.bubble.io/u/manager4)\
**Post date:** [November 12, 2023, 4:39pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/14 "2023-11-12T16:39:43Z")

</div>

I just caught my own syntax error in json body “client secret” corrected it to “client\_secret”. I still get the error.

---

<div class="post-metadata">

**Author:** ![ambroisedlg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ambroisedlg/32/61966_2.png) [@ambroisedlg](https://forum.bubble.io/u/ambroisedlg)\
**Post date:** [November 12, 2023, 4:49pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/15 "2023-11-12T16:49:33Z")

</div>

@manager4 can you please try and keep the exact same 5 parameters as in my screenshot above, and therefore remove the other 2 parameters? I don’t see why this wouldn’t work

Btw you still have a formatting issue with the quotes on the scope parameter key

Also change the version to the same as in mine

---

<div class="post-metadata">

**Author:** ![manager4](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manager4](https://forum.bubble.io/u/manager4)\
**Post date:** [November 14, 2023, 4:40am UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/16 "2023-11-14T04:40:29Z")

</div>

I tried the 5 same parameters and square version. Missing parameter

 ![Screenshot 2023-11-13 182944](https://us1.discourse-cdn.com/bubble/original/3X/6/c/6c18abf82f80f1cf0579b453b3c6dfe770954ca9.png)

---

<div class="post-metadata">

**Author:** ![ambroisedlg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ambroisedlg/32/61966_2.png) [@ambroisedlg](https://forum.bubble.io/u/ambroisedlg)\
**Post date:** [November 14, 2023, 4:52pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/17 "2023-11-14T16:52:30Z")

</div>

@manager4 try creating a new API call (do not duplicate the one you already have) and write (do not paste) the headers and parameters again.

Imo it’s either a caching issue or some parameters are not correctly formatted

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [November 14, 2023, 4:59pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/18 "2023-11-14T16:59:26Z")

</div>

Your content\_type header is not correct. This is content-type

---

<div class="post-metadata">

**Author:** ![ambroisedlg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ambroisedlg/32/61966_2.png) [@ambroisedlg](https://forum.bubble.io/u/ambroisedlg)\
**Post date:** [November 15, 2023, 8:13pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/19 "2023-11-15T20:13:56Z")

</div>

Good catch @Jici

---

<div class="post-metadata">

**Author:** ![manager4](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manager4](https://forum.bubble.io/u/manager4)\
**Post date:** [November 16, 2023, 10:55pm UTC](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473/20 "2023-11-16T22:55:18Z")

</div>

Alright that worked. I’m having some auth issues but you solved my missing parameter problem!  
@Jici can you explain the difference between the two please? Why is it “Content-Type”?

And thank you guys for your help! Appreciate you.

[Next page](https://forum.bubble.io/t/api-call-error-missing-parameter-but-works-in-postman/292473.md?page=2)
