Link Provider to Application
curl --request POST \
--url https://identity.sandbox.lerian.net/v1/applications/{id}/providers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"providerId": "<string>",
"alertType": "<string>",
"canSignIn": true,
"canSignUp": true,
"canUnlink": true,
"prompted": true,
"rule": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/applications/{id}/providers"
payload := strings.NewReader("{\n \"providerId\": \"<string>\",\n \"alertType\": \"<string>\",\n \"canSignIn\": true,\n \"canSignUp\": true,\n \"canUnlink\": true,\n \"prompted\": true,\n \"rule\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
providerId: '<string>',
alertType: '<string>',
canSignIn: true,
canSignUp: true,
canUnlink: true,
prompted: true,
rule: '<string>'
})
};
fetch('https://identity.sandbox.lerian.net/v1/applications/{id}/providers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://identity.sandbox.lerian.net/v1/applications/{id}/providers"
payload = {
"providerId": "<string>",
"alertType": "<string>",
"canSignIn": True,
"canSignUp": True,
"canUnlink": True,
"prompted": True,
"rule": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"alertType": "<string>",
"canSignIn": true,
"canSignUp": true,
"canUnlink": true,
"category": "<string>",
"prompted": true,
"providerId": "<string>",
"rule": "<string>",
"type": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}Link Provider to Application
Attaches an existing provider to an application.
Linking is the step that makes a configuration live, so it is also the step that can break delivery. Test the provider first (POST /v1/providers/{id}/test-send).
Failures:
404— no such application, or no such provider.409— that provider is already linked to this application.503 IDE-0066— the identity provider is unavailable (unreachable, too slow to answer, or failing). Nothing about the request was wrong; retry it later.
POST
/
v1
/
applications
/
{id}
/
providers
Link Provider to Application
curl --request POST \
--url https://identity.sandbox.lerian.net/v1/applications/{id}/providers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"providerId": "<string>",
"alertType": "<string>",
"canSignIn": true,
"canSignUp": true,
"canUnlink": true,
"prompted": true,
"rule": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/applications/{id}/providers"
payload := strings.NewReader("{\n \"providerId\": \"<string>\",\n \"alertType\": \"<string>\",\n \"canSignIn\": true,\n \"canSignUp\": true,\n \"canUnlink\": true,\n \"prompted\": true,\n \"rule\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
providerId: '<string>',
alertType: '<string>',
canSignIn: true,
canSignUp: true,
canUnlink: true,
prompted: true,
rule: '<string>'
})
};
fetch('https://identity.sandbox.lerian.net/v1/applications/{id}/providers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://identity.sandbox.lerian.net/v1/applications/{id}/providers"
payload = {
"providerId": "<string>",
"alertType": "<string>",
"canSignIn": True,
"canSignUp": True,
"canUnlink": True,
"prompted": True,
"rule": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"alertType": "<string>",
"canSignIn": true,
"canSignUp": true,
"canUnlink": true,
"category": "<string>",
"prompted": true,
"providerId": "<string>",
"rule": "<string>",
"type": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}Authorizations
JWT bearer token issued by the identity provider.
Path Parameters
Application ID.
Example:
"plugin-identity"
Body
application/json
Was this page helpful?

