Skip to main content

How to define the issuer when issuing a verifiable credential?

N
Written by Nick Reinhart
Updated over a year ago

When instantiating the Trinsic Service, one of the attributes of the method is the Auth Token:

const trinsic = new TrinsicService({
authToken: "<auth token>"
});

You must pass the Auth Token of the user you want to authenticate as. Once instantiated, any endpoint you call will be processed as being the defined user. If you issue a credential, for example, the issuer field of this VC will contain the public DID of the authenticated user.

If you want to issue credentials as another issuer, you must change the value of the variable's Auth Token and only then call the desired method:

trinsic.options.authToken = "<new auth token>";
trinsic.credential().issueFromTemplate(request);

You can find the root wallet's Auth Token on the Dashboard home page.

Did this answer your question?