demellor | Posts: 46

Obtain user's API key

0 votes

Is there a way to use master account API key to get user specific API key for a selected subaccount.  I'm not sure what call to use if it's possible.


Duo_Liang | Posts: 3776

Reply to: Obtain user's API key

0 votes

Hi Richard,

 

Thanks for your post! It's possible to use master account's main account API Key to get sender's subaccount API Key. This can be done in two steps:
#1 get master account's subaccount API Key with this API:
GET /api/account/subaccountApiKeys

Example response:

[

    {

        "accountUid": "mV2A1Ax5LQMC",

        "accountName": "OneSpan",

        "apiKey": "ZzVxxxxZbjVrUw=="

    },

    {

        "accountUid": "kqpjh5Lb800A",

        "accountName": "Termination",

        "apiKey": "ZzVtRxxxxhrWQ=="

    },

    {

        "accountUid": "AFrUfgFyhOIK",

        "accountName": "Offer",

        "apiKey": "ZzVtxxxZVQ=="

    }

]

 

#2 use master account's subaccount API Key to query sender's subaccount API Key:

GET /api/account/senders/{senderId}/apiKey

 

However, I think it's more suggested to only perform the step1, and manage sender's transactions with master account's (subaccount) API Key only. You can refer to my blog for more details:
https://www.onespan.com/blog/onespan-sign-developers-manage-senders-transactions-part-1

https://www.onespan.com/blog/onespan-sign-developers-manage-senders-transactions-part-2

 

Duo


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off