# API ConnectorでPostメソッドのAPIを利用する方法

**URL:** <https://www.nocode-faq.com/t/topic/2466>\
**Category:** bubble\
**Created:** [2021 年 12 月 23 日午前 2:10 UTC](https://www.nocode-faq.com/t/topic/2466 "2021-12-23T02:10:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rintaro.ishii0719](https://avatars.discourse-cdn.com/v4/letter/r/e99b99/32.png) [@rintaro.ishii0719](https://www.nocode-faq.com/u/rintaro.ishii0719)\
**Post date:** [2021 年 12 月 23 日午前 2:10 UTC](https://www.nocode-faq.com/t/topic/2466/1 "2021-12-23T02:10:51Z")

</div>

API Connectorを利用して、Google Apps Scriptで自作したPostメソッドのAPIを叩きたいと思っているのですが、どうしてもうまくいかず、  
Bubbleの問題か？Google Apps Scriptで作ったAPIの問題か？切り分けができないため、  
公開されているAPIで試してみました。

■利用したAPI

> **[すぐ呼び出し可能なWebAPIのサンプル](https://www.umayadia.com/Note/Note028WebAPISample.htm#A5_5)**
>
> 実際に呼び出せるREST WebAPIのサンプルです。WebAPI呼び出しの練習やお試しにご利用ください。

■設定画面

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ncc_forum/original/2X/1/16321c649f9b727694301440e13f033c48a6b60d.png)

■initializeした結果

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ncc_forum/original/2X/5/583c55ff8a3b34ff3fac8a1b436092ed104375de.png)

ただ、やはりうまくいかないので、Bubbleの問題かと思っているのですが、こちらは何が問題なものでしょうか？  
また、API ConnectorでPostメソッドを利用する際の入門記事・動画のようなものがもしあれば、ご教授いただけると大変うれしいです。

---

<div class="post-metadata">

**Author:** ![rintaro.ishii0719](https://avatars.discourse-cdn.com/v4/letter/r/e99b99/32.png) [@rintaro.ishii0719](https://www.nocode-faq.com/u/rintaro.ishii0719)\
**Post date:** [2021 年 12 月 23 日午前 4:42 UTC](https://www.nocode-faq.com/t/topic/2466/2 "2021-12-23T04:42:33Z")

</div>

ちなみに、Google Apps Scriptで作ったAPIを叩くと、下記のBubble forumのようなエラーが返ってきてしまいます。

> **[Having problems with POST method - API Connector](https://forum.bubble.io/t/having-problems-with-post-method-api-connector/57720)**
>
> Hello, I was trying to build an simple CMS system using bubble as my front end and Google Apps Script as my backend but it seems there’s a bug with the Bubble API Connector that is not allowing me to make it work. I can’t make the POST method work...

---

<div class="post-metadata">

**Author:** ![jansnap](https://sea2.discourse-cdn.com/flex020/user_avatar/www.nocode-faq.com/jansnap/32/6599_2.png) [@jansnap](https://www.nocode-faq.com/u/jansnap)\
**Post date:** [2021 年 12 月 24 日午前 1:30 UTC](https://www.nocode-faq.com/t/topic/2466/3 "2021-12-24T01:30:07Z")

</div>

以下のように設定したら成功しましたので、ご参考まで。

 ![ScreenShot 2021-12-24 10.28.36](https://us1.discourse-cdn.com/flex020/uploads/ncc_forum/original/2X/4/49470431c25fb05d605c2de20a358f31bd0bc83d.png)  
 ![ScreenShot 2021-12-24 10.28.45](https://us1.discourse-cdn.com/flex020/uploads/ncc_forum/original/2X/b/b1ab2fee8969cd36b75839ead93a8385739db527.png)

以下の記事を参考にしました。  
[https://blog.nocodelab.jp/entry/gsc](https://blog.nocodelab.jp/entry/gsc)

---

<div class="post-metadata">

**Author:** ![rintaro.ishii0719](https://avatars.discourse-cdn.com/v4/letter/r/e99b99/32.png) [@rintaro.ishii0719](https://www.nocode-faq.com/u/rintaro.ishii0719)\
**Post date:** [2021 年 12 月 24 日午前 2:19 UTC](https://www.nocode-faq.com/t/topic/2466/4 "2021-12-24T02:19:03Z")

</div>

@jansnap  
こちらコメントいただき、ありがとうございます！！  
「Queryst.」にチェックを入れることが必要だったのですね。  
私もお示しいただい記事は読んだことがあったのですが、  
ちゃんと理解ができていなかったです。。

「Queryst.」がどんな意味を持っているのかが良く分からず色々と調べてみたのですが、  
うまく見つけられずでして。。

どんな意味がある変数なのでしょうか…？

---

<div class="post-metadata">

**Author:** ![jansnap](https://sea2.discourse-cdn.com/flex020/user_avatar/www.nocode-faq.com/jansnap/32/6599_2.png) [@jansnap](https://www.nocode-faq.com/u/jansnap)\
**Post date:** [2021 年 12 月 27 日午前 7:34 UTC](https://www.nocode-faq.com/t/topic/2466/5 "2021-12-27T07:34:44Z")

</div>

返信遅くなりました。  
このAPIは数字をクエリストリング(クエリ文字列)に入れて送らないとエラーになるようです。  
ただし、送信結果を以下のURLで取得すると、ageは常に0になっており、何か動作がおかしいです。  
[https://umayadia-apisample.azurewebsites.net/api/persons/](https://umayadia-apisample.azurewebsites.net/api/persons/)

---

<div class="post-metadata">

**Author:** ![rintaro.ishii0719](https://avatars.discourse-cdn.com/v4/letter/r/e99b99/32.png) [@rintaro.ishii0719](https://www.nocode-faq.com/u/rintaro.ishii0719)\
**Post date:** [2021 年 12 月 27 日午前 8:25 UTC](https://www.nocode-faq.com/t/topic/2466/6 "2021-12-27T08:25:15Z")

</div>

@jansnap  
お忙しい中で、ご回答いただき、誠にありがとうございます！  
クエリストリング（クエリ文字列）ということだったのですね！  
（このAPI自体はサンプルとして拾ってきただけなので、大丈夫です！ありがとうございます！）
