PPTX Builder API
PPTX BuilderBook a demoAccount
v2
v2
  • Introduction
  • Guide
    • Create account
    • Get API Token
    • Webhook
    • Preparing Slides
  • Concepts
    • Intro
    • Slide Masters
    • Slide Layouts
    • Placeholders
    • Slide
  • API Reference
    • Authentication
    • JSON to PPTX Builder
      • Request Payload
        • Base Settings
        • Custom Settings
        • Global Chart Settings
        • Slide Settings
        • Chart Settings
          • Chart View Settings
        • Columns
        • Rows
        • Significance Test
        • Chart Title
    • JSON to PPTX
    • Append slide
      • Request Payload
    • Upload template
  • Fonts
  • Chart Types
  • Data Labels
  • Legend
  • Chart Specific Settings
  • Examples
    • JSON to PPTX Builder
    • API Token
    • Append slide
    • More examples
Powered by GitBook
On this page

Was this helpful?

  1. Examples

API Token

PreviousJSON to PPTX BuilderNextAppend slide

Last updated 4 years ago

Was this helpful?

Requirements

You will need two things in order to get your token.

  • Account credentials

  • Company key

Example Python

Bellow is an example on how to use them to get your API Token using library.

import requests
import json

key = "<YOUR_KEY>"
user = "<YOUR_USER>"
passwd = "<YOUR_PASSWORD>"

url = 'https://api.pptxbuilder.com/api/auth/token'

body = json.dumps({'key': key})
headers = {'Content-Type': 'application/json'}

response = requests.post(url, data=body, headers=headers,
                        auth=(user, passwd))

if response.status_code != 200:
    response_msg = response.json()
    print(response_msg['error'])
else:
    token = response.headers['Authentication-Token']
    content = response.content
    print(token)

Your API token is returned in the Headers.

"Authentication-Token" : "<your-token>"

If you need more detailed information please take a look at the API Reference for this endpoint:

requests
Authentication