Eleven labs API error in VAPI
# support
e
Hi, i created a voice clone in Vapi. I created an API and dopped it directly to Vapi Integration section. An error came up to say 'The provided credentials are not valid'. I checked the funtionality of the API with 11labs support via https://reqbin.com/curl and they said it was fine. They said the issue is with Vapi. Please can someone help me. A valid API key is being rejected as invalid. I have refreshed the Vapi dashboard, as well as logged in and out. I have a loom to demonstrate the issue, but it contains a confidential API - is it ok https://www.loom.com/share/bc47c34dc4c9464a91c939894c3c3319?sid=bc25f144-4bd1-44a3-9044-d168fe197669
k
Hey, can you share the org_id? You can find it [here](https://dashboard.vapi.ai/org/settings). This will help me get more details about it.
e
ccbd1b5d-edd2-4445-a93a-f3977b430a61
this is my org ID
help me please
The advice you gave before didn't work
Guys, seriously please help me
I am going to report your customer service to the podcast How To Build an AI - who's host i am friends with.
?
ccbd1b5d-edd2-4445-a93a-f3977b430a61
k
Hey @twin317 looking into it.
s
Hi @elsa231 , I’ve reviewed your Loom video and our logs. There haven’t been any changes on our side the error is coming from the 11labs API. Your API key itself is valid, but the issue is that its scopes are too restrictive. Rather than picking and choosing individual scopes, please: 1. Create a new API key with all available scopes enabled. 2. Include the “text-to-speech voices” scope (and any others required by 11labs). 3. Retry your request using this new key. That should resolve the authorization errors. Let me know how it goes!
@elsa231 Also your geeting another issue which is documented here.
Copy code
:yellow_circle: 15:18:09:789 Couldn't Insert Voice Library. Error: {
  "stack": "PostgresError: duplicate key value violates unique constraint 
  "severity_local": "ERROR",
  "severity": "ERROR",
  "code": "23505",
  "detail": "Key (provider, provider_id, org_id)=(11labs,xx, xx) already exists.",
  "schema_name": "public",
  "table_name": "voice_library",
  "constraint_name": "voice_library_provider_provider_id_org_id_idx",
  "file": "nbtinsert.c",
  "line": "666",
  "routine": "_bt_check_unique",
  "query": "\n        INSERT INTO voice_library \t\n          (\"provider\",\"slug\",\"provider_id\",\"name\",\"description\",\"gender\",\"accent\",\"preview_url\",\"is_deleted\",\"credential_id\",\"org_id\")values($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11)\t\n        RETURNING *\t\n      ",
  "message": "duplicate key value violates unique constraint \"voice_library_provider_provider_id_org_id_idx\""
}