Welcome to Portkey Forum

Updated 3 weeks ago

@Team Portkey just bumping the one above

just bumping the one above, in case it got missed

Also, I am unable to call the https://api.portkey.ai/v1/virtual-keys endpoint. This is what I get:

Plain Text
{
    "success": false,
    "data": {
        "message": "You do not have enough permissions to execute this request"
    }
}


From the Portkey UI I checked the Key has all the permissions
1
r
b
V
7 comments
@bhuvansingla this is only available on enterprise plans at the moment. We do plan to open up virtual key APIs to paid customers as well very soon.

Can you share where you're using the virtual key update APIs?
Hey Rohit! The use case is around rotating the virtual key's secrets programmatically via a cron.
Hey, ok. My bad here.. I was thinking about something different. We're investigating this now
@bhuvansingla confirming that this should work. I'd recommend to check your Portkey API key once again - the default one that you may be using might have restricted access.

Here's the working code:

Plain Text
curl -X GET 'https://api.portkey.ai/v1/virtual-keys' \
-H 'Content-Type: application/json' \
-H 'x-portkey-api-key: {PERMISSIONED_PORTKEY_API_KEY}' \
Can you please also confirm if you are sending the correct virtual key slug in the request?
Thanks everyone, this seems to work now! The missing pieces were:
  • api key header: I was sending it in the Bearer token before. Was this on the documentation page already? I missed to find it I think.
  • default key: Even though the UI shows the default key has all the access, only a new key helped here.
The docs for first one are wrong - we'll fix them!
Add a reply
Sign up and join the conversation on Discord