-
-
Notifications
You must be signed in to change notification settings - Fork 85
17. Client Link Api
Vincent Kok edited this page Dec 4, 2023
·
1 revision
Link a new organization to your OAuth application, in effect creating a new client.
var request = new ClientLinkRequest
{
Owner = new ClientLinkOwner
{
Email = "[email protected]",
GivenName = "Chuck",
FamilyName = "Norris",
Locale = "en_US"
},
Address = new AddressObject()
{
StreetAndNumber = "Keizersgracht 126",
PostalCode = "1015 CW",
City = "Amsterdam",
Country = "NL"
},
Name = "Mollie B.V.",
RegistrationNumber = "30204462",
VatNumber = "NL815839091B01"
};
using IClientLinkClient client = new ClientLinkClient({yourClientId}, {yourClientSecret});
ClientLinkResponse response = await clientLinkClient.CreateClientLinkAsync(request);
To the ClientLink link you created through the API, you can then add the OAuth details of your application, the client_id, scope you want to request
using IClientLinkClient client = new ClientLinkClient({yourClientId}, {yourClientSecret});
ClientLinkResponse response = await clientLinkClient.CreateClientLinkAsync(request);
var clientLinkUrl = response.Links.ClientLink;
string result = clientLinkClient.GenerateClientLinkWithParameters(clientLinkUrl, {yourState}, {yourScope}, {forceApprovalPrompt});