Revoke an API Key
import { PinataSDK } from "pinata"; const pinata = new PinataSDK({ pinataJwt: process.env.PINATA_JWT!, pinataGateway: "example-gateway.mypinata.cloud", }); const revoke = await pinata.keys.revoke([ "94566af5e63833e260be" ]);
type RevokeKeyResponse[] = { key: string; status: string; };
string[]
An array of API Keys to revoke. This is the key found in the response of keys.list
key
keys.list
const revoke = await pinata.keys.revoke([ "94566af5e63833e260be" ]);