Generate a fresh presentation by utilizing a PowerPoint template and JSON data via a request to the PowerPointGeneratorAPI service.
Step 1. Create an account
Sign up to PowerPointGeneratorAPI here. Make a note of your email address, password and security key. You will need these to create an authentication token.
Security key will be emailed to you.
Step 2. Create an authentication token
All API calls require authentication. You can create an authentication token manually using the Web Console or programmatically using the POST below.
This endpoint enables you to create an authentication token. You will need this for all requests to the API.
Your authentication token is only valid for 24 hours. Once your token has expired you will need to request a new token.
import requests# API endpoint for token creationurl ="https://auth.powerpointgeneratorapi.com/v1.0/token/create"# Your credentials and security keycredentials ={'username':'<your_username>','password':'<your_password>','key':'<your_security_key>'}# Headers for the HTTP requestheaders ={'Content-Type':'application/x-www-form-urlencoded'}# Send a POST request to the API endpoint with credentialsresponse = requests.post(url, headers=headers, data=credentials)# Print the response from the APIprint(response.text)
// Create a new FormData object to handle the form dataconstformData=newFormData();formData.append("username","<your_username>");formData.append("password","<your_password>");formData.append("key","<your_security_key>");// Define the options for the fetch requestconstrequestOptions= { method:'POST', body: formData,// Set the body of the request to the FormData object redirect:'follow'// Specify the redirect behavior};// Make a POST request to the authentication endpointfetch("https://auth.powerpointgeneratorapi.com/v1.0/token/create", requestOptions).then(response =>response.text()) // Parse the response as text.then(result =>console.log(result)) // Log the result to the console.catch(error =>console.error('Error:', error)); // Log any errors that occur
Populate the KEY and VALUE with your username, password and key
Hit Send to get your Token
Step 3: Make a request to PowerPointGeneratorAPI
Download the zip folder below. Using Postman, or some other API client, post the .pptx template file and the JSON data file from the zipped folder to the generator/create endpoint to create your presentation.
In the Body tab add the following parameters:
files: upload the .pptx file from the zipped folder above
jsonData: copy and paste the data from the zipped folder above
Click Send and Download save the output as `.pptx`.
Output .pptx file
You will receive a byte array that can be converted to a PowerPoint presentation. Your PowerPoint will contain a single slide that looks like this: