Get certificate
client.admin.organization.certificates.retrieve(stringcertificateID, CertificateRetrieveParams { include } query?, RequestOptionsoptions?): Certificate { id, certificate_details, created_at, 3 more }
GET/organization/certificates/{certificate_id}
Get a certificate that has been uploaded to the organization.
You can get a certificate regardless of whether it is active or not.
Get certificate
import OpenAI from 'openai';
const client = new OpenAI({
adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted
});
const certificate = await client.admin.organization.certificates.retrieve('certificate_id');
console.log(certificate.id);{
"object": "certificate",
"id": "cert_abc",
"name": "My Example Certificate",
"created_at": 1234567,
"certificate_details": {
"valid_at": 1234567,
"expires_at": 12345678,
"content": "-----BEGIN CERTIFICATE-----MIIDeT...-----END CERTIFICATE-----"
}
}
Returns Examples
{
"object": "certificate",
"id": "cert_abc",
"name": "My Example Certificate",
"created_at": 1234567,
"certificate_details": {
"valid_at": 1234567,
"expires_at": 12345678,
"content": "-----BEGIN CERTIFICATE-----MIIDeT...-----END CERTIFICATE-----"
}
}