跳到主要内容
ArcBlock Community

Can we create and manage passports programmatically via SDK/APIs?

Twelve
开发者
blocklet-server

Hello Team,

We’re building an admin layer inside our blocklet (DeBOS) and want to handle team access fully in-app. Can a blocklet app programmatically create a passport invitation and receive both the invite link and passport number/ID in the API response, so we can display and persist them in our own admin UI?

Thank you.

5 条回复

wangshijun5个月前

Of course you can, you can do this with @blocklet/sdk, checkout documentation here: Blocklet Service

Twelve5个月前(edited)

Very cool. Was able to build a UI in our app that allows users to create and maintain passports. I hadn't realized how important this would be, but now i see that without this feature a user does not really feel like they own identity.

Screenshot 2026-03-29 at 7.28.12 AM.png

Twelve5个月前

DeBOS now supports native, in-app passport onboarding (no dashboard dependency for day-to-day flow):

  • Admin/Owner can create passport invites directly from Add Person.
  • Invite creation supports employee name-based passport role/title, remark, expiry window, and capabilities.
  • DeBOS stores and shows practical outputs: invite link/code, provider invite ID, and passport ID when available.
  • Invite lifecycle actions are in-app: copy, resend, refresh/reconcile, revoke, reissue.
  • Accepted and revoked invites are auto-archived from the active invite list; accepted users land in People.
  • Duplicate protection is built in (blocks duplicate pending/recent accepted invites, with controlled override path).
  • Employee record creation is tied to acceptance logic (internal roles default on), with outcome tracking.
  • Offboarding is now native: archive user + attempt passport access revoke.
  • Full auditability is included via invite activity events and per-invite audit view.

In short: DeBOS can now generate and manage custom employee passports end-to-end from its own UI with enterprise-safe controls.

Twelve5个月前(edited)

z1VV21NqNWkiadznN32ALkos5dQqQwnCMty

We’re seeing inconsistent access-key behavior for createMemberInvitation in a hosted/live Blocklet instance.

What works with the same stored access key:

  • createRole
  • deleteRole

What fails:

  • createMemberInvitation

Error: No valid passport found: you don't have the required role "admin".

Important details:

  • The key is valid and definitely used at runtime
  • The key is labeled Admin
  • Manual invite creation in the Blocklet dashboard works
  • Backend access-key invite creation fails in hosted/live
  • The same backend workflow succeeds in local/dev

So our question is:

Is createMemberInvitation officially supported with access-key auth in hosted/live Blocklet environments?

If yes:

  • what exact key/passport binding is required?

If no:

  • is manual dashboard invite creation using a session authority that cannot be represented by access keys?

We’re building a multi-instance app where owner should configure a service key once, and the backend should use that key for daily role + invite onboarding. Right now role creation works, but invite creation does not.

*One other issue to consider is that we were not able to generate invites in our UI when creating a access key with the owner passport attached to our app in the dev environment. We had to use the server level access key in order to be able to generate the correct key. Both keys were made with owner passports and given admin permission, however only the one made at server level was successful. Not having access to our our live insanct blocket server may be part of the problem causing our live invite system to work.

Twelve5个月前(edited)

I would also suggest considering to let admin passport naturally have the same invitation rights as owner. It seems that the without this same power, owner passport may be needed for day to day opeartions. This may not be the best format, as we are considering to suggest to our users that after initial setup the owner passport be stored somewhere that is not subject to daily exposure. This would be done to insure it is not lost or compromised as recovery is very difficult.

回复