Hi folks, is there a way to create the secret shar...
# infisical-help
t
Hi folks, is there a way to create the secret sharing links via API, SDK or similar?
j
Hey @Thiago De Sa, yes sir! You can absolutely do this via the API. We have endpoints under
/api/v1/secret-sharing
that let you create, list, access, and delete shared secrets programmatically. You can authenticate using a machine identity access token. To create a sharing link, just
POST /api/v1/secret-sharing
with your
secretValue
,
expiresIn
, and optionally things like
password
,
maxViews
,
accessType
, etc. — it'll return a
sharedSecretLink
you can send to whoever needs it. Check out the API docs here for the full details: https://infisical.com/docs/api-reference/overview/introduction
🥳 1
t
Tks Jake!
@Yury Prokashev
y
Can you guys confirm, I won't be able to see secrets shared on behalf of M2M identity in my Infisical UI on this page? Here only secrets shared by me are visible, right?
j
@Yury Prokashev That's right. The Secret Sharing page in the UI only shows secrets that you created. So if a machine identity creates shared secrets through the API, you won't see them in your dashboard. If you need to manage secrets created by a machine identity, you'd do that through the API as well, using
GET /api/v1/secret-sharing
with the machine identity's access token to list them.
👍 1
y
thank you, @Jake (Infisical)!