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.
Richard DeMello
November 18Created
November 18Last Updated
a year agoLast Reply
1Replies
62Views
2Users
0Likes
0Links
Duo_Liang | Posts: 3776
Reply to: Obtain user's API key
Friday, November 18, 2022 at 11:05am
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
Reply to: Obtain user's API key
Friday, November 18, 2022 at 11:05amHi 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
Duo Liang OneSpan Evangelism and Partner Integrations Developer