How to Determine API Key
Monday, February 22, 2021 at 03:01pmHi,
I am developing a tool for creating packages for different senders under our OneSpan account. Can you tell me how to determine which API key to use for the different senders? The user account with the "Owner" role is able to see an API key under their account, however I guess this isn't the key that needs to be used as all transactions created appear under the owner account only. We need them to appear under the individual user (member/sender role) accounts.
Is a different API key used in this case? Or is there different way of specifying the transaction for a sender?
Thanks
Reply to: How to Determine API Key
Monday, February 22, 2021 at 04:58pmHi Steve,
If you are simply creating transactions on behalf of each senders, you can leverage the "send on behalf of" feature to specify the transaction owner, see below code snippet:
DocumentPackage package = PackageBuilder.NewPackageNamed("Test Package .NET")
.WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]")
.WithFirstName("Signer First Name")
.WithLastName("Signer Last Name")
.WithCustomId("Signer1"))
......
.WithSenderInfo(SenderInfoBuilder.NewSenderInfo("your_sender_email"))
.Build();
PackageId packageId = eslClient.CreatePackageOneStep(package);
With account owner's API Key, you can retrieve each transaction created by different senders:
eslClient.GetPackage(packageId);
But if you want to list ALL transactions, you'd retrieve the respective sender's API Key first, then use their individual API Keys to retrieve transactions in bulk. In a previous post, I've made some sample codes there.
Duo
Reply to: How to Determine API Key
Monday, February 22, 2021 at 05:36pmThanks for this. To be clear, there is no way for a sender to obtain their own individual API key through the OneSpan GUI (similar to how the account owner can)? This can only be done through code? I have a Manager role and cannot see anywhere within my login to obtain this for myself. Thanks.
Reply to: Thanks for this. To be…
Monday, February 22, 2021 at 05:41pmHi Steve,
Yes, there's no way to get Sender API directly from UI.
Duo
Reply to: How to Determine API Key
Monday, February 22, 2021 at 08:46pmOk thanks.