Worldly Public API Authentication Guide
This guide explains how to authenticate requests to the Worldly Public API, including how to generate and use the required headers.Overview
Every Worldly API request requires two authentication headers:The
x-developer-request-token expires every 12 hours. You must regenerate it periodically to maintain access.Prerequisites
Before beginning, ensure you have the following:- A valid Developer Account API Key
- A valid Integration Account API Key
-
The Developer Public Key (
public.pem) downloaded from the Worldly Platform-
Profile>Account Settings>Integrations
-
-
OpenSSL installed
- macOS default path:
/opt/homebrew/bin/openssl - Windows: Win32 OpenSSL
- macOS default path:
macOS / Linux Instructions
1. Set Environment Variables
Check both values are set correctly:
2. Create the Plaintext Token String
Combine your Integration Key and the current UTC timestamp with an ampersand (&) separator:
Example content:
3. Encrypt Using Your Developer Public Key
Encrypt the string with your Developer Public Key, then Base64-encode it.Save the output token to an environment variable:
4. Send an API Request
5. Troubleshooting
6. Example: Full Script (macOS/Linux)
7. Token Renewal
- Tokens expire after 12 hours.
- Add this script to a cron job or automated workflow that runs twice daily.
Windows / PowerShell Instructions
1. Set Environment Variables
2. Create the Plaintext String
3. Encrypt and Encode
4. Send API Request
5. Troubleshooting
6. Example: Full PowerShell Script
7. Token Renewal
- Tokens expire every 12 hours.
- Automate regeneration with a Windows Task Scheduler job that runs the script twice daily.
Quick Reference
Summary
- Combine your Integration Key and a current UTC timestamp.
- Encrypt the string with your Developer Public Key using OpenSSL.
- Base64-encode and remove newlines.
- Send the token as
x-developer-request-tokenalong with yourx-api-key. - Regenerate every 12 hours.

