简体   繁体   中英

How to get the BOX service accounts userid/mail to add it as a collaborator to a file?

I have created the service account and can see the details in admin console, I need to get the service accounts userid without going to admin console. Is there a api call for that?

Yes, you can use the Get Current User API call: https://developer.box.com/reference/get-users-me/

The response will contain the ID for the current user, which is normally your service account when using JWT Auth: https://developer.box.com/guides/authentication/jwt/with-sdk/

Here is a recent forum post which is similar: https://support.box.com/hc/en-us/community/posts/360049526313-How-to-create-an-email-alias-for-a-JWT-app-

The mailid/userid will be visible to the admin in admin console. The easiest way is to contact the admin to get it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM