Pinata Docs
Search…
Revoke API Key

Endpoint

/users/revokeApiKey

Description

This endpoint allows an administrator to revoke API keys that have previously been issued. Only admins can revoke API keys.
The purpose of this endpoint is to allow for programmatic revocation of API keys.
This endpoint will return a string of "Revoked" when successful.

Type

PUT

Headers

Body

1
{
2
"apiKey": "KEY TO REVOKE"
3
}
Copied!

Response

"Revoked"

Postman Example

JavaScript With Axios Example

1
const axios = require('axios');
2
3
export const revokeApiKey = (pinataApiKey, pinataSecretApiKey, apiKey) => {
4
const url = `https://api.pinata.cloud/users/revokeApiKey`;
5
const body = {
6
apiKey: apiKey
7
};
8
return axios
9
.post(url, body, {
10
headers: {
11
pinata_api_key: pinataApiKey,
12
pinata_secret_api_key: pinataSecretApiKey
13
}
14
})
15
.then(function (response) {
16
//handle response here
17
})
18
.catch(function (error) {
19
//handle error here
20
});
21
};
Copied!

We want your feedback!

Have a suggestion? Have a complaint? Confused about something in the documentation? Just want to say hi?
We want to make Pinata the best product available. That involves listening to our users and addressing their needs.
Send us an email at [email protected] and we'll see how we can help.
Last modified 3mo ago