Finds a secret in the secret store by name and scope.
Parameters
- namestringRequired
A name for the secret that’s unique within the scope.
- scopeobjectRequired
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.
typeenumRequired The secret scope type.
Possible enum valuesaccountA secret scoped to an account. Use this for API keys or other secrets that should be accessible by all UI Extension contexts.
userA secret scoped to a specific user. Use this for oauth tokens or other per-user secrets. If this is set,
scope.must also be set.user - scope.
userstring The user ID. This field is required if
typeis set touser, and should not be provided iftypeis set toaccount.
Returns
Returns a secret object.
Response
{ "id": "appsecret_5110hHS1707T6fjBnah1LkdIwHu7ix", "object": "apps.secret", "created": 1680209063, "expires_at": null, "livemode": false, "name": "my-api-key", "scope": { "type": "account" }}