The Secret object 

Connect
Secrets
Secrets

Attributes

  • idstring

    Unique identifier for the object.

  • objectstring

    String representing the object’s type. Objects of the same type share the same value.

  • createdtimestamp

    Time at which the object was created. Measured in seconds since the Unix epoch.

  • deletednullable boolean

    If true, indicates that this secret has been deleted

  • expires_atnullable timestamp

    The Unix timestamp for the expiry time of the secret, after which the secret deletes.

  • livemodeboolean

    Has the value true if the object exists in live mode or the value false if the object exists in test mode.

  • namestring

    A name for the secret that’s unique within the scope.

  • payloadnullable stringExpandable

    The plaintext secret value to be stored.

  • scopeobject

    Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

    • scope.typeenum

      The secret scope type.

      Possible enum values
      account

      A secret scoped to an account. Use this for API keys or other secrets that should be accessible by all UI Extension contexts.

      user

      A secret scoped to a specific user. Use this for oauth tokens or other per-user secrets. If this is set, scope.user must also be set.

    • scope.usernullable string

      The user ID, if type is set to “user”

The Secret object
{
"id": "appsecret_5110hHS1707T6fjBnah1LkdIwHu7ix",
"object": "apps.secret",
"created": 1680209063,
"expires_at": null,
"livemode": false,
"name": "my-api-key",
"scope": {
"type": "account"
}
}