Safety 2 (formerly PyUp)
  • Welcome to Safety 2
  • 2023 Rebrand from PyUp to Safety Cybersecurity
  • Safety 2.x Basics
    • Getting started with Safety 2.x
    • Running a Safety Scan
    • License Scanning
  • Safety CLI 2 Scanner
    • Installation & Quick Start - Safety 2
    • Docker Containers
    • Inputs
    • Output Formats
    • Policy File
    • Applying Security Updates to Requirements Files
    • Exit Codes
    • Help and Support
    • Safety v1 to v2 Breaking Changes
  • Securing Git SCM Pipelines
    • Securing Git Repositories
    • GitHub Actions
      • Advanced Options: GitHub Actions
    • BitBucket Pipelines
    • Gitlab Pipelines
    • GitHub Integration
    • Scanning Development Environments with Git Post-Commit Hook
  • Troubleshooting
    • Invalid API Key Error
Powered by GitBook
On this page
  1. Troubleshooting

Invalid API Key Error

PreviousScanning Development Environments with Git Post-Commit Hook

Last updated 1 year ago

An invalid API key error means you are not using a valid Safety API key. If this API key was working previously, then the key may have been invalidated (for example, rotated) or your Safety account is no longer active.

How to get a Safety API key

If you already have a Safety account, once logged in you can find your API key on the page.

If you do not have a Safety account, you can obtain a Safety API key by for a free trial or a paid account.

If your team already has a Safety account and you need an API key assigned to you, please get in touch with your team's Safety admin to add you as a team member.

Using the Safety API key in Safety CLI

To access and utilize additional features of Safety, you will need to configure Safety to use a PyUp API key. There are two ways to do this:

  • append your Safety commands with the command-line argument --key {YOUR_API_KEY}. For example safety check --key {YOUR_API_KEY}

  • save your API key as the environment variable SAFETY_API_KEY. For example export SAFETY_API_KEY YOUR_API_KEY

If you have any further questions, please don't hesitate to contact us via email at . We're always here to help.

Teams and API Keys
signing up
support@s
afetycli.com