Closer
Search…
Widget OAuth configuration

Configuration

You can configure oauth authorization for customers on our endpoint: https://spinner.closer.app/api/oauth-config. All requests needs admin's ApiKey in X-Api-Key header. To create a config send a POST with body:
1
{
2
"tokenEndpoint": "http://oauth.com/token",
3
"userInfoEndpoint": "http://oauth.com/userinfo",
4
"clientId": "clientId",
5
"clientSecret": "clientSecret",
6
"oauthConfigEnabled": true
7
}
Copied!
You can retrieve config by executing GET request. Result should look like this:
1
{
2
"tokenEndpoint": "http://oauth.com/token",
3
"userInfoEndpoint": "http://oauth.com/userinfo",
4
"clientId": "clientId",
5
"clientSecret": "**",
6
"oauthConfigEnabled": true
7
}
Copied!
To update config you can use PATCH request with body:
1
{
2
"tokenEndpoint": "http://oauth.com/token",
3
"userInfoEndpoint": "http://oauth.com/userinfo",
4
"clientId": "clientId",
5
"clientSecret": "clientSecret",
6
"oauthConfigEnabled": true
7
}
Copied!
The only field required when updating config is oauthConfigEnabled.
You can also delete your config by simply executing DELETE without body.

/userinfo endpoint

This endpoint should return body:
1
{
2
"id": "external_id_2",
3
4
"phone": { "region": "PL", "number": "666777666" },
5
"firstName": "Tyler",
6
"lastName": "Durden",
7
"backOfficeData": [{
8
"key": "office_number",
9
"value": ""777666777",
10
"displayName": "Office number"}]
11
}
Copied!
Only id field is required. In backOfficeData you can specify any additional information you want to display for your agents.
Last modified 7mo ago