Auth Configs
Create new authentication configuration
Creates a new auth config for a toolkit, allowing you to use your own OAuth credentials or API keys instead of Composio-managed authentication. This is required when you want to use custom OAuth apps (bring your own client ID/secret) or configure specific authentication parameters for a toolkit.
POST
/
api
/
v3
/
auth_configs
Create new authentication configuration
import requests
url = "https://backend.composio.dev/api/v3/auth_configs"
payload = {
"toolkit": { "slug": "<string>" },
"auth_config": {
"type": "use_composio_managed_auth",
"credentials": {},
"restrict_to_following_tools": []
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
toolkit: {slug: '<string>'},
auth_config: {
type: 'use_composio_managed_auth',
credentials: {},
restrict_to_following_tools: []
}
})
};
fetch('https://backend.composio.dev/api/v3/auth_configs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://backend.composio.dev/api/v3/auth_configs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"toolkit": {
"slug": "<string>"
},
"auth_config": {
"type": "use_composio_managed_auth",
"credentials": {},
"restrict_to_following_tools": []
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://backend.composio.dev/api/v3/auth_configs"
payload := strings.NewReader("{\n \"toolkit\": {\n \"slug\": \"<string>\"\n },\n \"auth_config\": {\n \"type\": \"use_composio_managed_auth\",\n \"credentials\": {},\n \"restrict_to_following_tools\": []\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://backend.composio.dev/api/v3/auth_configs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"toolkit\": {\n \"slug\": \"<string>\"\n },\n \"auth_config\": {\n \"type\": \"use_composio_managed_auth\",\n \"credentials\": {},\n \"restrict_to_following_tools\": []\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://backend.composio.dev/api/v3/auth_configs");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-api-key", "<api-key>");
request.AddJsonBody("{\n \"toolkit\": {\n \"slug\": \"<string>\"\n },\n \"auth_config\": {\n \"type\": \"use_composio_managed_auth\",\n \"credentials\": {},\n \"restrict_to_following_tools\": []\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"toolkit": {
"slug": "<string>"
},
"auth_config": {
"id": "<string>",
"auth_scheme": "<string>",
"is_composio_managed": true,
"restrict_to_following_tools": []
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}Authorizations
ApiKeyAuthUserApiKeyAuth
Body
application/json
Create new authentication configuration
import requests
url = "https://backend.composio.dev/api/v3/auth_configs"
payload = {
"toolkit": { "slug": "<string>" },
"auth_config": {
"type": "use_composio_managed_auth",
"credentials": {},
"restrict_to_following_tools": []
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
toolkit: {slug: '<string>'},
auth_config: {
type: 'use_composio_managed_auth',
credentials: {},
restrict_to_following_tools: []
}
})
};
fetch('https://backend.composio.dev/api/v3/auth_configs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://backend.composio.dev/api/v3/auth_configs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"toolkit": {
"slug": "<string>"
},
"auth_config": {
"type": "use_composio_managed_auth",
"credentials": {},
"restrict_to_following_tools": []
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://backend.composio.dev/api/v3/auth_configs"
payload := strings.NewReader("{\n \"toolkit\": {\n \"slug\": \"<string>\"\n },\n \"auth_config\": {\n \"type\": \"use_composio_managed_auth\",\n \"credentials\": {},\n \"restrict_to_following_tools\": []\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://backend.composio.dev/api/v3/auth_configs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"toolkit\": {\n \"slug\": \"<string>\"\n },\n \"auth_config\": {\n \"type\": \"use_composio_managed_auth\",\n \"credentials\": {},\n \"restrict_to_following_tools\": []\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://backend.composio.dev/api/v3/auth_configs");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-api-key", "<api-key>");
request.AddJsonBody("{\n \"toolkit\": {\n \"slug\": \"<string>\"\n },\n \"auth_config\": {\n \"type\": \"use_composio_managed_auth\",\n \"credentials\": {},\n \"restrict_to_following_tools\": []\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"toolkit": {
"slug": "<string>"
},
"auth_config": {
"id": "<string>",
"auth_scheme": "<string>",
"is_composio_managed": true,
"restrict_to_following_tools": []
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}