Skip to main content
All CollectionsHow-tosArticlesAuthentication guides
PDF Generator Authentication Guide
PDF Generator Authentication Guide

How to authenticate PDF Generator for use with Tines

Daniel Stoeski avatar
Written by Daniel Stoeski
Updated over a year ago

PDF Generator API allows you easily generate transactional PDF documents and reduce the development and support costs by enabling your users to create and manage their document templates using a browser-based drag-and-drop document editor.

First, get PDF Generator credentials

  1. Log in to your PDF Generator account

  2. Click "Settings" and copy your "API key" and "Secret" to a text editor


Lastly, create a PDF Generator credential in Tines

You will need to create:

  • One Resource: "PDF Generator username"

  • Two Credentials:

    • Text type: "PDF Generator API key"

    • JWT type: "PDF Generator"

Resource

  1. Login to your Tines tenant

  2. Navigate to the team that will be using the API and click "Resource"

  3. Click "+ New Resource"

  4. Input the values for the PDF Generator resource

    1. Name: PDF Generator username

    2. Description: Optional

    3. Builder: Your PDF Generator username

  5. Optional

    1. Access: What other teams can also use the resource

  6. Click "Save resource"

Text type

  1. Navigate to the team that will be using the API and click "Credentials"

  2. Click "+ New Credential" and select "Text"

  3. Input the values for the PDF Generator credential

    1. Name: PDF Generator API key

    2. Description: Optional

    3. Value: Your PDF Generator API key

  4. Optional

    1. Domains: Ensure this credential can only be used when making HTTP requests to specific domains.

    2. Access: What other teams can also use the API

  5. Click "Save"

JWT type

  1. Log in to your Tines tenant

  2. Navigate to the team that will be using the API and click "Credential"

  3. Click "+ New Credential" and select "JWT"

  4. Input the values for the PDF Generator credential

    1. Name: PDF Generator

    2. Description: Optional

    3. Algorithm: HS256

    4. Payload: Copy the below object and paste into the "Plain code" section:

      1. Replace <unix_epoch_time> with the unix epoch time timestamp of how long the the token is valid for.

        • It is highly recommended to set the exp timestamp for a short period, i.e. a matter of seconds, that way if a token is intercepted or shared, the token will only be valid for a short period of time.

      {
      "iss": "<<CREDENTIAL.pdf_generator_api_key>>",
      "sub": "<<RESOURCE.pdf_generator_username>>",
      "exp": "<unix_epoch_time>"
      }

    5. Tick "Auto generate 'iat' (Issued At) & 'exp' (Expiration Time) claims"

    6. HMAC Secret: Your Secret

  5. Optional

    1. Domains: Ensure this credential can only be used when making HTTP requests to specific domains

    2. Access: What other teams can also use the API

  6. Click "Save"

Your credential should look like the following:

For more on creating credentials in Tines, click here.

You can find a selection of PDF Generator stories in the story library

Did this answer your question?