是否可以通过提供角色友好名称而不是角色 SID 来更新频道中成员的角色?
我问这个的原因是因为我想避免在我的末端存储任何生成的标识符并只保留友好的名称。
在这种特殊情况下,我想为 Channel 和 Member Identifiers(Path Variables)以及 RoleSid(Form Body)传递友好名称
我指的是成员角色 API 。
是否可以通过提供角色友好名称而不是角色 SID 来更新频道中成员的角色?
我问这个的原因是因为我想避免在我的末端存储任何生成的标识符并只保留友好的名称。
在这种特殊情况下,我想为 Channel 和 Member Identifiers(Path Variables)以及 RoleSid(Form Body)传递友好名称
我指的是成员角色 API 。
Twilio developer evangelist here.
I would recommend that you store the generated role identifiers. Friendly names are not enforced to be unique, so the best way to refer to a role is by it's Sid.
If you are really against storing the Sids (and I don't see why you would be), you could always list all the roles and filter by the friendly name that you are looking for, then use the Sid from that resource in the request to update the role.
Let me know if that helps.