Skip to main content
2 of 3
edited body

Deploy your API with public permissions or add Username and Password parameters to URLFetch:

With[{cloudobject = FileNameJoin[{$CloudRootDirectory, "FactorIntegerAPI"}]}, 
   CloudDeploy[
      APIFunction[{"x" -> "Integer"}, FactorInteger[#x] &],
      cloudobject, Permissions -> "Public"]; 
   URLFetch[URLBuild[cloudobject, {"x" -> "1"}]]]