Question
Is it possible to get Vantage client id using Powershell?
Answer
The sample to get the client id is the following:
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "Bearer YOUR_BEARER")
$headers.Add("Content-Type", "application/json")
$body = "{
`n `"clientName`": `"your_client_name`",
`n `"description`": `"description`",
`n `"redirectUris`": [
`n `"localhost/`",
`n `"yourdomain/`"
`n ],
`n `"allowRopc`": true,
`n `"allowOfflineAccess`": true,
`n `"allowedScopes`": [
`n `"openid`",
`n `"permissions`",
`n `"global.wildcard`"
`n ]
`n}"
$response = Invoke-RestMethod 'https://vantage-eu.abbyy.com/api/adminapi2/v1/tenants/YOUR_TENANT/clients/' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
In addition, to get correct syntax, the Postman can be used to convert the request to the needed format:
Postman collection is attached to the article.
Comments
0 comments
Please sign in to leave a comment.