Roboflow Docs
DashboardResourcesProducts
  • Product Documentation
  • Developer Reference
  • Changelog
  • Developer Tools
  • Authentication
    • Find Your Roboflow API Key
    • Scoped API Keys
    • Workspace and Project IDs
  • Command Line Interface (CLI)
    • Using the CLI
    • Install and Set Up the CLI
    • List Workspaces and Projects
    • Download a Dataset
    • Upload a Dataset
    • Run a Model on an Image
  • REST API
    • Using the REST API
    • Authenticate with the REST API
    • List Workspaces and Projects
  • Search Images in a Dataset
  • Create a Project
  • Get a Project and List Versions
  • Manage Project Folders
  • List Image Batches
  • Create and List Annotation Jobs
  • Manage Images
    • Upload an Image
    • Get Details About an Image
    • Delete an Image from a Dataset
    • Upload an Annotation
    • Search for an Image
    • List, Add, and Remove Image Tags
  • Versions
    • View a Version
  • Export Data
  • Annotation Insights
    • Annotation Insights (Legacy Endpoint)
  • Model Monitoring
    • Retrieve Statistics About Deployed Models in a Workspace
    • Attach Metadata to an Inference
  • Python SDK
    • Using the Python SDK
  • Authenticate with the Python SDK
  • List Workspaces
  • List Projects and Versions
  • Create a Project
  • Create a Dataset Version
  • Train a Model
  • Upload a Dataset
  • Search for an Image
  • iOS SDK
    • Using the iOS SDK
Powered by GitBook
On this page
  • Authenticate with the CLI
  • Authenticate with the SDK

Was this helpful?

Authenticate with the Python SDK

You can authenticate with the Python package using:

  • A command, or;

  • A login() method.

Authenticate with the CLI

To authenticate with the Python SDK using the command line, run:

roboflow auth

You will then be given a URL to which you can go to issue a Token.

You will be asked to select a workspace, then given a token for use in the Python package or CLI.

This Token will then be used to saved to your computer for use in authenticating with the Roboflow API through the Python Package.

To reauthenticate, run roboflow auth again.

Authenticate with the SDK

You can also authenticate with the SDK using the roboflow.login() method.

To authenticate with this method, add the following line of code after you import the roboflow Python package into a script:

roboflow.login()

You will then be given a URL to which you can go to issue a Token.

You will be asked to select a workspace, then given a token for use in the Python package or CLI.

This Token will then be used to saved to your computer for use in authenticating with the Roboflow API through the Python Package.

If you want to change accounts, you will need to reauthenticate. You can reauthenticate using the following command:

roboflow.login(force=True)
PreviousUsing the Python SDKNextList Workspaces

Last updated 16 hours ago

Was this helpful?