# Postman Request Works but API Connector Request Not Working

**URL:** <https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872>\
**Category:** Plugins\
**Created:** [November 16, 2019, 2:32am UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872 "2019-11-16T02:32:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jibbystyle](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jibbystyle/32/165854_2.png) [@Jibbystyle](https://forum.bubble.io/u/Jibbystyle)\
**Post date:** [November 16, 2019, 2:32am UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/1 "2019-11-16T02:32:16Z")

</div>

Hello,

I’ve used Postman to create an API call and it is working fine.

Once I try to bring the same parameters over to the API Connector I keep getting a response that shows “400” and that the parameter “grant\_type” is a missing parameter when you can clearly see it has been added to the body of the API call that I am initializing.

 ![API%20Connector%20400%20Response](https://us1.discourse-cdn.com/bubble/original/3X/9/c/9c68e5ea075f77fa69443516c2e5d67d5a19ed98.png) ![Body%20Parameters](https://us1.discourse-cdn.com/bubble/original/3X/f/c/fc4ebae2ce6b1dac786d63450aec383321d8e97d.png)

Can anyone figure out why this is occurring and how I can fix it.

Thank You,

Gabriel

---

<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 16, 2019, 3:13am UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/2 "2019-11-16T03:13:13Z")

</div>

I guess that api expect json. Add header: Content-Type  
with value to  
application/json

---

<div class="post-metadata">

**Author:** ![Jibbystyle](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jibbystyle/32/165854_2.png) [@Jibbystyle](https://forum.bubble.io/u/Jibbystyle)\
**Post date:** [November 16, 2019, 3:28am UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/3 "2019-11-16T03:28:54Z")

</div>

Thanks for the response.

I’ve tried that.

It actually has to be URLEncoded. Which works in Postman.

I just can’t get it to work in API connector. It’s so strange because the “grant\_type” parameter is clearly being sent in the request.

---

<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 16, 2019, 4:42am UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/4 "2019-11-16T04:42:53Z")

</div>

In this case, I suggest you to use the Correct content type in header.  
Can you share the Postman Call so we can compare.  
I suggest you to also send the request to [requestbin.com](http://requestbin.com) url so you can compare the output and do the correction

---

<div class="post-metadata">

**Author:** ![Jibbystyle](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jibbystyle/32/165854_2.png) [@Jibbystyle](https://forum.bubble.io/u/Jibbystyle)\
**Post date:** [November 16, 2019, 2:45pm UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/5 "2019-11-16T14:45:21Z")

</div>

Hello,

I’ve tried to add the Content-Type application/x-www-form-urlencoded value to the body parameters of the request as well in API connector and it still hasn’t worked. I’ve basically tried everything.

It still is working fine in Postman.

Here is my request and you can see the successful response.

 ![Postman%20Request](https://us1.discourse-cdn.com/bubble/original/3X/0/4/04e535805161b019eae2f1993e74121d8e5c1255.png)

---

<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 16, 2019, 3:25pm UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/6 "2019-11-16T15:25:52Z")

</div>

Can you send the request to a requestbin And show the result (including headers)

---

<div class="post-metadata">

**Author:** ![Jibbystyle](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jibbystyle/32/165854_2.png) [@Jibbystyle](https://forum.bubble.io/u/Jibbystyle)\
**Post date:** [November 16, 2019, 3:36pm UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/7 "2019-11-16T15:36:20Z")

</div>

I’ll have to do that later and let you know.

This request in Postman is going through with no Headers and successful.

---

<div class="post-metadata">

**Author:** ![Jibbystyle](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jibbystyle/32/165854_2.png) [@Jibbystyle](https://forum.bubble.io/u/Jibbystyle)\
**Post date:** [November 16, 2019, 7:44pm UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/8 "2019-11-16T19:44:44Z")

</div>

I’m trying to use RequestBin right now and it is a little different.

Any suggestions how I can rig it up similar to Postman request ?

It doesn’t seem so user friendly.

Thanks,

Gabriel

---

<div class="post-metadata">

**Author:** ![chriscardone](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/chriscardone/32/41367_2.png) [@chriscardone](https://forum.bubble.io/u/chriscardone)\
**Post date:** [November 16, 2019, 10:01pm UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/9 "2019-11-16T22:01:34Z")

</div>

Hi @Jibbystyle,

I would suggest checking what headers Postman has added onto this, make sure all are reflected in your API Connector, this is often what is making it not work in bubble 🙂

Check under temporary headers too for things like “Accept”, “Response”, etc.

---

<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 17, 2019, 12:55am UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/10 "2019-11-17T00:55:51Z")

</div>

Requestbin will show you exactly the content of your request. You canbyse the same url to send from postman and send from Bubble and compare both to 7nderstand the difference between each call. Most of the time this is related to header. I think that you should send screenshot of header and content received by requestbin so it will be easier for us to help you. You can also share the requestbin url so we can see it ourself (the url that show you the result of the request, not the url used to send the request). Only if you make it public

---

<div class="post-metadata">

**Author:** ![Jibbystyle](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jibbystyle/32/165854_2.png) [@Jibbystyle](https://forum.bubble.io/u/Jibbystyle)\
**Post date:** [November 17, 2019, 2:55am UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/11 "2019-11-17T02:55:27Z")

</div>

Hello,

I just tried adding all the temporary headers to my call in API connector.

I am still getting the same 400 response saying the “grant\_type” parameter form is missing.

It just doesn’t make any sense that it is working in Postman and not API Connector.

I’ve tried everything. I also tried to add application/x-www-form-urlencoded to the body of the JSON.

It appears to be that way in the Postman request.

I’m not sure what to do at this point. Any ideas would be greatly appreciated.

Thanks,

Gabriel

---

<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 17, 2019, 3:36am UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/12 "2019-11-17T03:36:50Z")

</div>

Because you seem to have trouble to understand how requestbin work, I’ve done test myself.  
So if you just put no header and send your request, the content type is set to application/json.  
If you add a header set to application/x-www-form-urlencoded, this will, again, overwrite and be application/json (this is why I tell you to test with requestbin because API connector in Bubble have some strange behavior that I’ve already discussed in another topic).

Now. If you keep the header and put {} in json body, you will have the right header… but parameters will not be sent.

Now let’s try something else. Instead of adding parameters, we will add it in the url like ?grant\_type=[grant\_type] … this will be application/x-www-form-urlencoded and grant\_type will be sent as query parameters. This is better, but not perfect.

Finally, Try:  
Content type header set to: application/x-www-form-urlencoded  
Clear all other parameters, don’t set any parameters in url. And use a json body like:

```auto
{
"grant_type":"<grant_type>"
}

```

It’s work.

I know, it doesn’t make sense, but it’s actually how this work.

---

<div class="post-metadata">

**Author:** ![Jibbystyle](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jibbystyle/32/165854_2.png) [@Jibbystyle](https://forum.bubble.io/u/Jibbystyle)\
**Post date:** [November 17, 2019, 3:56am UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/13 "2019-11-17T03:56:08Z")

</div>

Hello,

I just wanted to say Thank You so much for your time and effort on this subject.

I am going to digest this new concept and sleep on it as I’ve burnt myself out on this the last few days.

I will get back into it and try what you’ve suggested tomorrow or Monday.

Thanks again for the extremely valuable information and help with this issue.

---

<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 17, 2019, 4:12am UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/14 "2019-11-17T04:12:53Z")

</div>

This is not really your issue but more a strange behavior od the API connector. It’s always hard to find when you don’t know which tool you can use to debug that.

---

<div class="post-metadata">

**Author:** ![Jibbystyle](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jibbystyle/32/165854_2.png) [@Jibbystyle](https://forum.bubble.io/u/Jibbystyle)\
**Post date:** [November 19, 2019, 3:53pm UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/15 "2019-11-19T15:53:43Z")

</div>

Hello,

I am attempting to follow your instructions and I apologize if I did it incorrectly but I am still receiving the same 400 error message.

Here is a snapshot of what I did. Not sure if I did correctly. Any other advice or suggestions would be appreciated greatly.

 ![API%20Connector%20Call](https://us1.discourse-cdn.com/bubble/original/3X/6/0/60c1106fd914357ea904baf71e1b07c86f6e8466.png)

Thanks,

Gabriel

---

<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 19, 2019, 4:07pm UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/16 "2019-11-19T16:07:57Z")

</div>

do you have link do API Doc?  
If you have correct informations in each fields, this look ok. 400 mean an authorization issue. The request is ok but maybe other information are not. Also, in some API’ you need to authorize the correct domain in API info.  
Did you get any error message with the 400?

---

<div class="post-metadata">

**Author:** ![Jibbystyle](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jibbystyle/32/165854_2.png) [@Jibbystyle](https://forum.bubble.io/u/Jibbystyle)\
**Post date:** [November 19, 2019, 4:12pm UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/17 "2019-11-19T16:12:20Z")

</div>

Same thing I keep getting. Strange cause it still works fine in Postman.

There was an issue setting up your call.

Raw response for the API  
Status code 400  
{“error”:“invalid\_request”,“error\_description”:“Missing form parameter: grant\_type”}

---

<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 19, 2019, 4:17pm UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/18 "2019-11-19T16:17:14Z")

</div>

My mistake. 400 is error on request not auth. Do you have the direct link to API doc so I can check and let you know

---

<div class="post-metadata">

**Author:** ![Jibbystyle](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jibbystyle/32/165854_2.png) [@Jibbystyle](https://forum.bubble.io/u/Jibbystyle)\
**Post date:** [November 19, 2019, 4:22pm UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/19 "2019-11-19T16:22:10Z")

</div>

[copilotapi.integratepayments.com](http://copilotapi.integratepayments.com)

Endpoint : [https://accountsuat.cardconnect.com/auth/realms/cardconnect/protocol/openid-connect/token](https://accountsuat.cardconnect.com/auth/realms/cardconnect/protocol/openid-connect/token)

I’ve tried using version headers as well.

Still working in Postman fine.

Thanks for the help.

---

<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 19, 2019, 10:46pm UTC](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872/20 "2019-11-19T22:46:53Z")

</div>

I think I found a way to make it work but not sure because I don’t have any key.  
Try this  
In header;  
Content-Type value set to application/x-www-form-urlencoded  
No parameters  
body  
grant\_type=password&username=yourusername&password=yourpassword&client\_id=yourid&client\_secret=secretkey

This is similar that if you encode it in url.

Let me know!

[Next page](https://forum.bubble.io/t/postman-request-works-but-api-connector-request-not-working/71872.md?page=2)
