Skip to main content

wolfram cloud - CloudDeploy fails when using WolframAlpha as APIFunction



I am trying to create a Wolfram API that returns, for an input expression, how Wolfram Alpha interprets that input.


For example, given the string "1 plus 2", the API should return "1 + 2".


Locally, the following definition works.


api = APIFunction[{"expr" -> "String"}, First[WolframAlpha[#expr, "WolframForms"]] &]

However, when deploying it, using CloudDeploy[api], the result returned is always First[$Failure].


Why does the WolframAlpha function work locally, but not when used in CloudDeploy?




Comments