Authentication

Authenticate to gain access to functionalities within the SDK.


In a configuration file

  1. Create a credentials.json file.
  2. Copy and paste the following code into the created file:

    JSON

        {
      "username": "<your-email-address>",
      "password": "<your-password>"
    }
    
      
  3. Retrieve the email address and password used for logging into the console. Use them as values in the following arguments:

    • Set the value of the username argument to your email address.
    • Set the value of the password argument to your password.
  4. Authenticate from the created credentials.json file:

    Python

        import up42
    up42.authenticate(cfg_file="credentials.json")
    
      

Directly in the code

  1. Copy and paste the following code:

    Python

        import up42
    up42.authenticate(
       username="<your-email-address>",
       password="<your-password>",
    )
    
      
  2. Retrieve the email address and password used for logging into the console. Use them as values in the following arguments:

    • Set the value of the username argument to your email address.
    • Set the value of the password argument to your password.