Hello,
I created API keys using https://eu.api.ovh.com/createToken/
as specified in this documentation https://help.ovhcloud.com/csm/en-gb-api-getting-started-ovhcloud-api?id=kb_article_view&sysparm_article=KB0042784
They work no problem, but I can not find the interface to list, edit, delete the API keys.
Note: I'm the root user of the OVH account.
Same here. After creating some API keys with unlimited access time, I'd expect to have an interface to delete them, it'd be very dangerous otherwise.
As the https://help.ovhcloud.com/csm/en-gb-api-getting-started-ovhcloud-api?id=kb_article_view&sysparm_article=KB0042784">API says
> There is currently no Control Panel option to list and revoke your keys. The API portal can be used to do that
You can create a new API token, add GET, POST and DELETE URLs `` to have access to everything, and then authenticate in a way like this (assuming your newly created app is the last and you want to delete all apps):
from ovh import Client # pip install ovh==1.1.2
OVH_CREDS = {
'endpoint': 'ovh-',
'application_key': '',
'application_secret': '',
'consumer_key': '********'
}
client = Client(**OVH_CREDS)
apps = client.get('/me/api/application')
for app in apps:
client.delete(f'/me/api/application/{app}')
Side notes:
- don't call your script ``ovh.py`` it will conflict with the actual ``import ovh``
- you need to create an API key with the correct rights:
GET /me/api/application/
DELETE /me/api/application/
You can access it at this url :
https://eu.api.ovh.com/console-old/#/me/api/application~GET
In the branch /me/api
Hello,
For people that find this thread, there is now a UI to manage API keys : https://www.ovh.com/manager/#/iam/dashboard/applications
I see generated api keys in https://www.ovh.com/manager/#/iam/api-keys but only thing I can do with them is delete operation which is rather weird because when I would like to add new allowed get, post, put, delete query I need to delete it and insert all data again. Is this supposed to work that way ? Why there is no modify option for api key ?
Isn't the very first line of this thread sufficient ?
"I created API keys using https://eu.api.ovh.com/createToken/ "
You can use this: https://manager.eu.ovhcloud.com/#/iam/api-keys
I also forked a CLI tool to manage API keys, written in Go: https://gitlab.com/MaesterZ/ovh-akm
It can cleanup credentials from OVH console/manager and credentials not matching an existing application automatically.
I forked a small CLI tool in Go to manage your OVH API keys, you can also cleanup credentials from console / GUI logins and credentials not matching an existing application: