A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://reference.wolfram.com/language/workflow/DeployAnAPIThatUsesAPermissionsKey.html below:

Deploy an API That Uses a Permissions Key—Wolfram Documentation

WOLFRAM Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

WolframConsulting.com

Deploy an API That Uses a Permissions Key

Deploy a web API that requires specifying a permissions key to use it.

Create an APIFunction

Create an APIFunction that computes the distance between two cities specified by name:

Deploy the APIFunction to the Wolfram Cloud with a permissions key

Deploy the APIFunction to the cloud, requiring a permissions key to use it:

Test the API from a browser

Verify that an API works as you expect by calling it from a browser. To construct a URL that calls the API, right-click the URL in the CloudObject output of CloudDeploy and choose Copy Address:

Paste the address into a browser search field and append a question mark (?) followed by the names and values of the parameters separated by ampersands (&) and finally, the permissions key preceded by _key=; for example, "?city1=Chicago&city2=Miami&_key=fish23":

Call the API from a non-Wolfram language

Use EmbedCode to get the code for calling the API from Python. Click Copy to Clipboard to copy the embed code:

Paste the embed code into a Python script and add the permissions key to the cloud call:

Run the Python script:

$ ./APITest.py 
1378.25516483735
Notes

To call an API function with a permissions key programmatically from the Wolfram Language, use URLExecute, specifying the permissions key as a _key argument:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4