How to create a rest api in app maker?

别来无恙 提交于 2019-12-01 09:58:21

问题


Is there a way to create a REST API in a server side script in app maker?

I need to call a server side function from an iOS app passing some parameters and have a response without having to go to a page in the app.

I know that for regular google apps script it’s possible trough the Execution API but I don’t know how to do it inside app maker.

Thanks.


回答1:


TL;DR

You cannot use App Maker via Execution API at this time


I tried to use App Script Execution API with App Maker and here are my findings:

  • You can enable Execution API for App Maker app deployment in Google Cloud Console, just go to Settings -> Deployments -> Select deployment -> View Logs (these steps will navigate you to associated Cloud Project), then follow these instructions to enable API itself and create credentials:

  • Next goes deal breaker for combining App Maker and Execution API... To use App Script app as API you need to deploy it as 'API executable', but App Maker publishes its deployments as 'web app'... I'm not sure, if one can have App Script app simultaneously published both as 'web app' and 'API executable', but even if it is possible App Maker doesn't allow you do it at this time.



来源:https://stackoverflow.com/questions/45909358/how-to-create-a-rest-api-in-app-maker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!