/cert/get

Retrieve either a certificate, the corresponding signing request, or the private key.

Each of these can be downloaded from the TinyCert dashboard, but may also be trieved using this API call. Certificates, requests as well as keys are always in PEM encoded form.

It is not possible to retrieve multiple values in a single request. If you need both the private key and the certificate chain, simply issue two API calls.

Endpoint

https://www.tinycert.org/api/v1/cert/get (JSON)
https://www.tinycert.org/api/v1/cert/get.xml (XML)

Parameters

cert_idrequired

Numeric identifier of the certificate for which to retrieve the certificate, signing request, or private key.

tokenrequired

Session identifier.

whatrequired

Used to select which data to retrieve. Must be one of the following strings:

  • cert - retrieve certificate
  • chain - retrieve the certificate chain (the regular certificate, with the corresponding CA certificate concatenated)
  • csr - retrieve the certificate signing request
  • key.dec - retrieve the private key in unencrypted form
  • key.enc - retrieve the private key in encrypted form
  • pkcs12 - retrieve the private key and certificate in PKCS#12 format

Return value

On success, this call returns an object with a single property, either pem or pkcs12. This contains the PEM encoded certificate, CSR or private key, or the PKCS#12 archive with the private key and certificate.

pemstring

The PEM encoded certificate, key or signing request for the requested certificate. The string contents can be dumped directly to a .pem file.

pkcs12string

The PKCS#12 encoded archive (certificate and private key) for the requested certificate. The string contents must be base64 decoded before being dumped to a .pfx file. You will need your passphrase in order to decrypt the contents.

  1. Introduction
    1. Signing requests
    2. Error conditions
  2. API sessions
    1. /connect: Open a new API session
    2. /disconnect: Close an open API session
  3. Certificate Authority management
    1. /ca/list: Get a list of all CAs in your account
    2. /ca/details: Get further details on a given CA
    3. /ca/get: Download the CA's certificate
    4. /ca/delete: Delete a given CA
    5. /ca/new: Create a new CA
  4. Certificate management
    1. /cert/list: Get a list of all certificates for a given CA
    2. /cert/details: Get further details on a given certificate
    3. /cert/get: Download the certificate, signing request, or private key for a certificate
    4. /cert/reissue: Re-issue an existing certificate
    5. /cert/status: Change certificate status
    6. /cert/new: Create a new certificate