Skip to content

🔑 Authentication

To create and run a workflow, you first need to authenticate with UP42 via your project credentials.

Get your Project credentials

Log in to UP42.com and create a new project or select an existing one. In the project's Developers section you can find the project_id and project_api_key.

Authenticate

Authenticate by providing the project credentials (see step above) directly in the code:

Inline authentication
import up42
up42.authenticate(project_id="your project ID", project_api_key="your-project-API-key")


Or create a simple configuration json file and provide its file path:

conf.json
{
  "project_id": "your project ID",
  "project_api_key": "your-project-api-key"
}
Authentication from conf.json file
import up42
up42.authenticate(cfg_file="config.json")

If everything went well, you should receive a confirmation message

Expected output

YYYY-MM-DD HH:MM:SS - Got credentials from config file.
YYYY-MM-DD HH:MM:SS - Authentication with UP42 successful!


Continue with the Structure chapter!