https://linen.dev logo
Create custom toolkit config via the API
# 🖥│support-forum
u
Hello, We are trying to create custom toolkit config via the API but we seem to have a problem. Here's the doc; https://docs.composio.dev/api-reference/auth-configs/post-auth-configs For
use_custom_auth
, we are required to provide
credentials
. I am not sure what this credentials are. Can you help with this? https://cdn.discordapp.com/attachments/1402657770481909770/1402657770716795011/image.png?ex=68955f18&is=68940d98&hm=c74a3236e56fcd2b38d76580cf66277e6fe5587be99cf2068988ce5be4f9cc83&
c
Hi Paschal, these are the Toolkit credentials like client_id and secret. Also, could you specify the Toolkit you are trying to create Custom Auth for?
u
I am trying to create for serp, I am not sure what to provide since there's no credentials to provide.
c
Got it! You can actually leave the credentials empty in case of API_KEY based Toolkits. I'll share a CUrl req for your reference:
Copy code
curl -X POST https://backend.composio.dev/api/v3/auth_configs \
     -H "x-api-key: <api-key>" \
     -H "Content-Type: application/json" \
     -d '{
  "toolkit": {
    "slug": "SERPAPI"
  },
  "auth_config": {
    "type": "use_custom_auth",
    "credentials": {},
    "authScheme": "API_KEY"
  }
}'
Let me know if this works for you!