This seems more complicated than just using the original APIs, as none of the sample applications or StackOverflow questions you might find with a quick Google (for instance, creating a capability token with Twilio) would apply any more.
As thinkingkong asked, what's the use case?