Authentication is a mandatory process of verifying your identity as an UP42 user. Access to UP42 services is allowed or denied based on the identity of the requester.
The UP42 platform works based on the following structure: Project > Workflow > Block > Job. The access token is associated with a single project created by the UP42 user and it is also defined as a project token. The project token is created using 2 values: the project ID and project API key.
For the API calls, we recommend using several third party tools (see table below).
|cURL||command-line HTTP client for getting or sending data using URL syntax.|
|jq||lightweight command-line tool for processing the JSON syntax.|
|jwt-cli||command-line tool for decoding the project token. This token is based |
on JSON Web Tokens and uses a Hashed Message Authentication Code
(HMAC) based on SHA-512.
To generate the project ID and project API key, please follow the steps below:
- If you do not have an UP42 account, register here.
- After registering, create a project on the console and locate the project credentials here.
- Create the project variables
PROJ(project ID) and
PKEY(project API key) using the following commands:
After the project variables have been created, get the project token:
PTOKEN=$(curl -sX POST "https://$PROJ:$PKEY@api.up42.com/oauth/token" -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=client_credentials' | jq -r '.data.accessToken')
Please note that the token is valid for 5 minutes. To get a new token, recall the command by typing
Now that you have access to the UP42 services, you can proceed with the API calls.