Menu

API Key Management

API Key Introduction

(1) What is API Key?

  • API Key is a parameter that developers pass in the HTTP request as the identity identifier of the caller. The server identifies the identity of the caller and performs permission control through API Key. It is a randomly generated text with a length of 35 characters.

(2) API Key enables access to related interfaces of OpenAPI

(3) Control Range of API Key

  • When an account A creates an API Key under a specified project P, the API Key will be bound to account A and project P, and the binding relationship cannot be changed. In other words, this API Key can only access the OpenAPI under project P as the identity of account A.
  • The scope of an API Key (mainly referring to the projects that can be accessed by the API Key, as well as data permissions and function permissions under the projects) is consistent with the projects where the API Key takes effect and the account that distributes this API Key. When the permissions of the account are adjusted, the scope of the API Key's permissions will also change.

(4) Generation and Management of API Key

  • Specific product pages are provided to generate and manage API Keys. Please refer to "Function Introduction" below for details.

(5) How to Use API Key

(6) Relationship and Comparison Between API Key and API Secret


Effective VersionFeaturesAccessible API interfaces
API KeyAfter SBP1.4 (inclusive)
    • Only applicable for accessing OpenAPI
    • Can be applied for and used with any account identity
    • Controls the permissions for accessing OpenAPI through the approved account
    • Supports configuration of validity period
https://manual.sensorsdata.cn/openapi (continuously updated)
API SecretBefore SBP1.4 (exclusive)
    • Only applicable for old API
    • Can only be used as admin
    • Modifying the admin password leads to API Secret change
    • Does not support access control to the APIs that can be accessed
    • Does not support configuration of validity period
https://manual.sensorsdata.cn/sa/2.5/tech_super_api-103776384.html
  • Note: Because migration from API Secret to API Key requires corresponding migration from the old API to OpenAPI, there are certain development costs. Therefore, old customers (customers who have installed versions before sbp1.4) will have both API Key and API Secret functionality available

Version Description

After SBP1.4 (inclusive), it can be managed using API Key


Feature Introduction

Feature Entrance

  • Entrance: Project Settings > Basic Settings > API Key Management

Function Detailed Introduction

  • Click "API Key Management" to enter the API Key list
  • List display fields:
    • API Key name, supports fuzzy search
    • API Key value, supports copying
    • Creation time, year-month-day hour-minute-second
    • Expiration time, year-month-day hour-minute-second; expired keys will be marked as "Expired"
    • Last usage time, year-month-day hour-minute-second
  • Supported operations:
    • Add API Key
    • Modify configuration
    • Delete
  • The list only displays API Keys created by the current user in the current project
  • The data in the list is sorted in reverse chronological order by creation time, with the newest at the front
  • Expired API Keys will become invalid but will not be deleted from the list

  • Click the "Add" button to open the "Add API Key" dialog, which displays the newly added API Key and supports copying. (Each account can have up to 10 API Keys at the same time; the "Add" button becomes unclickable once 10 keys have been reached)
  • The "Add API Key" dialog allows you to choose to directly close the dialog or modify the configuration:
    • After clicking "Close", the corresponding data appears in the list:
      • The API Key name is automatically generated. The rule is "API Key name {Created year, month, day, hour, second}", for example, API Key name 20220715165727
      • Expiration time, displayed as "Permanent"
    • Click "Modify configuration", will enter the API Key modification configuration pop-up window:
      • API Key name. This parameter is mandatory and can be entered manually. A maximum of 200 characters can be entered
      • Expiration time. Permanent is selected by default. If you choose custom, the time control will appear to select, year, month, day, minute and second;
      • When saving the file, check whether the API Key name is entered. And whether they duplicate existing ones

  • API Key supports modification. Click Modify configuration to display the corresponding modification window
  • API Key supports deletion. When you click delete, there will be a pop-up window to confirm twice. After confirming again, delete


Authority control

  • This function is controlled by the permission point, the corresponding permission point location: Management permission "Project Basic Settings" management API Key
  • The default administrator role has this permission point


Last modified: 2024-12-27