Whitelisting redirected URLs
In order for redirection to work, it's necessary to whitelist the URL to be redirected.
To do that, you have to add your URL into this PATCH:
curl -X PATCH "https://sec-id-api.securitize.io/v1/{domainID}" -H "accept: application/json" -H "Authorization: {secret}" -H "Content-Type: application/json" -d "{body}"P
Parameter
Description
{domainID}
Your application client id provided by Securitize
Authorization
Your application secret provided by Securitize
body
looks like below
1
{
2
"appIcon": "Icon url",
3
"appName": "The Name of your App or [yourdomain]",
4
"redirectUrls": [
5
"https://[yourdomain]/*"
6
}
Copied!

Example

Curl
Python
1
curl -X PATCH "https://sec-id-api.securitize.io/v1/{domainID}" -H "accept: application/json" -H "Authorization: {secret}" -H "Content-Type: application/json" -d "{body}"
Copied!
where the body looks like below:
1
{
2
"appIcon": "Icon url",
3
"appName": "The Name of your App or [yourdomain]",
4
"redirectUrls": [
5
"https://[yourdomain]/*"
6
}
Copied!
Python snippet to Whitelist a specific domain [yourdomain]
1
serviceUrl = 'https://sec-id-api.sandbox.securitize.io/v1/'
2
ClientID ="STRING"
3
Secret ="STRING"
4
5
body = {'appIcon':'TheIcon',
6
'appName':'TheAppName',
7
'redirectUrls':['yourdomain']}
8
9
response = requests.patch(
10
serviceUrl + ClientID ,
11
headers={'Authorization': Secret},
12
data= body
13
)
14
15
print(response.headers)
16
17
if (response.status_code == 200):
18
print("Correctly updated")
19
else:
20
print('Error: ', response.content)
Copied!
Last modified 4mo ago
Copy link
Contents
Example