Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.38 KB

authentication.md

File metadata and controls

55 lines (38 loc) · 1.38 KB

🔑 Authentication

To use the UP42 Python SDK, you first need to authenticate with UP42 via your project credentials:

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

Get your Project credentials

Log in to UP42.com and select a Project. In the project's Developers section you can find the Project ID and Project API key.

![Image title](assets/auth.png){ width="680" }

Authenticate

The most simple way to authenticate is to enter the project credentials directly in your code. After successful authentication you will receive a confirmation message.

import up42
up42.authenticate(project_id="your-project-ID", 
                  project_api_key="your-project-API-key")
YYYY-MM-DD HH:MM:SS - Authentication with UP42 successful!

Optional: Use configuration file

In order to hide your credentials, you can also read your credentials from a configuration JSON file.

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

⏭️ Continue with the Search & Order data chapter.