curl --request POST \
--url https://{tenant}/api/clientidps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My OIDC Provider",
"issuer": "https://idp.example.com",
"jwks_uri": "https://idp.example.com/.well-known/jwks.json",
"api_mappings": {}
}
'import requests
url = "https://{tenant}/api/clientidps"
payload = {
"name": "My OIDC Provider",
"issuer": "https://idp.example.com",
"jwks_uri": "https://idp.example.com/.well-known/jwks.json",
"api_mappings": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My OIDC Provider',
issuer: 'https://idp.example.com',
jwks_uri: 'https://idp.example.com/.well-known/jwks.json',
api_mappings: {}
})
};
fetch('https://{tenant}/api/clientidps', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}/api/clientidps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My OIDC Provider',
'issuer' => 'https://idp.example.com',
'jwks_uri' => 'https://idp.example.com/.well-known/jwks.json',
'api_mappings' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/api/clientidps"
payload := strings.NewReader("{\n \"name\": \"My OIDC Provider\",\n \"issuer\": \"https://idp.example.com\",\n \"jwks_uri\": \"https://idp.example.com/.well-known/jwks.json\",\n \"api_mappings\": {}\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))
}HttpResponse<String> response = Unirest.post("https://{tenant}/api/clientidps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My OIDC Provider\",\n \"issuer\": \"https://idp.example.com\",\n \"jwks_uri\": \"https://idp.example.com/.well-known/jwks.json\",\n \"api_mappings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/api/clientidps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My OIDC Provider\",\n \"issuer\": \"https://idp.example.com\",\n \"jwks_uri\": \"https://idp.example.com/.well-known/jwks.json\",\n \"api_mappings\": {}\n}"
response = http.request(request)
puts response.read_body{
"Status": "success",
"Message": "client idp created",
"Meta": "6644b38535715ec496cbef3d"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}Create a client IdP.
Create a new client IdP. name and jwks_uri are required. issuer is optional. If client_idp_id is not supplied it defaults to the record’s internal ID hex. org_id is set server-side from the session and cannot be overridden.
curl --request POST \
--url https://{tenant}/api/clientidps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My OIDC Provider",
"issuer": "https://idp.example.com",
"jwks_uri": "https://idp.example.com/.well-known/jwks.json",
"api_mappings": {}
}
'import requests
url = "https://{tenant}/api/clientidps"
payload = {
"name": "My OIDC Provider",
"issuer": "https://idp.example.com",
"jwks_uri": "https://idp.example.com/.well-known/jwks.json",
"api_mappings": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My OIDC Provider',
issuer: 'https://idp.example.com',
jwks_uri: 'https://idp.example.com/.well-known/jwks.json',
api_mappings: {}
})
};
fetch('https://{tenant}/api/clientidps', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}/api/clientidps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My OIDC Provider',
'issuer' => 'https://idp.example.com',
'jwks_uri' => 'https://idp.example.com/.well-known/jwks.json',
'api_mappings' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/api/clientidps"
payload := strings.NewReader("{\n \"name\": \"My OIDC Provider\",\n \"issuer\": \"https://idp.example.com\",\n \"jwks_uri\": \"https://idp.example.com/.well-known/jwks.json\",\n \"api_mappings\": {}\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))
}HttpResponse<String> response = Unirest.post("https://{tenant}/api/clientidps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My OIDC Provider\",\n \"issuer\": \"https://idp.example.com\",\n \"jwks_uri\": \"https://idp.example.com/.well-known/jwks.json\",\n \"api_mappings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/api/clientidps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My OIDC Provider\",\n \"issuer\": \"https://idp.example.com\",\n \"jwks_uri\": \"https://idp.example.com/.well-known/jwks.json\",\n \"api_mappings\": {}\n}"
response = http.request(request)
puts response.read_body{
"Status": "success",
"Message": "client idp created",
"Meta": "6644b38535715ec496cbef3d"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}Authorizations
The Tyk Dashboard API Access Credentials
Body
Human-readable name. Required.
JWKS endpoint URL. Required — this is the IdP's signing-key source with no discovery fallback.
Optional stable identifier. If not provided, defaults to the record's internal ID hex. Must be unique within the org.
Issuer URL. Optional — used as a selection hint downstream; an empty value is accepted.
JWT claim that holds the OAuth scopes (e.g. scope, scp, roles). Optional — when empty the gateway falls back to the scope claim.
Map of api_id → ScopeMapping. Defaults to an empty map if not provided.
Show child attributes
Show child attributes
{
"b84fe1a04e5648927971c0557971565c": {
"scope_to_policy": { "read": "665d51505715ec2d76022c87" }
}
}
Was this page helpful?