Skip to content

Conversation

@nicolasiscoding
Copy link
Member

Summary

  • Added configuration constants to all 44 TurboSign API example files
  • Eliminated hardcoded values for better developer experience
  • Fixed base URL to use correct https://api.turbodocx.com
  • Ensured consistent structure across all programming languages

Changes

  • Python (8 files): FastAPI & Flask examples across all workflow steps
  • NodeJS (8 files): Express & Fastify examples across all workflow steps
  • PHP (4 files): cURL examples across all workflow steps
  • Go (4 files): net/http examples across all workflow steps
  • C# (8 files): Controller & Minimal API examples across all workflow steps
  • Java (4 files): HttpClient examples across all workflow steps
  • Ruby (4 files): Net::HTTP examples across all workflow steps
  • PowerShell (4 files): Invoke-RestMethod examples across all workflow steps

Benefits

✅ Developers only need to update constants at the top of each file
✅ No more hunting for scattered hardcoded values throughout code
✅ Consistent structure across all 8 programming languages
✅ Correct API endpoint for all examples

🤖 Generated with Claude Code

nicolasiscoding and others added 7 commits September 18, 2025 16:27
…gn API

- Add new section explaining both template-based and coordinate-based positioning
- Include detailed coordinate field configuration table with all required fields
- Add coordinate system notes (origin, page dimensions, boundaries)
- Include practical coordinate examples in TLDR section
- Add coordinate-specific best practices and troubleshooting tips
- Clarify when to use coordinate vs template positioning

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Replace verbose browser headers with minimal required set
- Standardize headers across all examples: Content-Type, Authorization, x-rapiddocx-org-id, User-Agent
- Set User-Agent to 'TurboDocx API Client' for backend tracking
- Remove 80+ unnecessary header lines across 9 files
- Clean up authentication section, all 3 API steps, and 8 JavaScript examples

Headers removed:
- origin, referer, accept, dnt, accept-language, priority
- sec-ch-ua*, sec-fetch-* (Chrome security headers)
- x-device-fingerprint, verbose user-agent strings

This makes API integration much cleaner and easier to copy/paste.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
…ross all languages

- Removed bloated browser-specific headers (origin, referer, accept, sec-*, dnt, etc.)
- Standardized to minimal essential headers across all 36 code examples
- Kept only: Authorization, x-rapiddocx-org-id, Content-Type (where needed), User-Agent
- Added consistent "TurboDocx API Client" User-Agent for backend tracking
- Updated examples in Python (Flask/FastAPI), PHP, C#, Go, Java, Ruby, PowerShell
- Cleaned headers in upload, recipients, prepare, and complete workflow examples

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Add configuration constants at the top of all API example files to eliminate scattered hardcoded values. This makes it much easier for developers to update API tokens, organization IDs, and other configuration values in one centralized location.

Changes:
- Added consistent constant declarations across all 44 files
- Replaced hardcoded "YOUR_API_TOKEN" references with constants
- Replaced hardcoded "YOUR_ORGANIZATION_ID" references with constants
- Replaced hardcoded base URLs with BASE_URL constant
- Replaced hardcoded document names with DOCUMENT_NAME constant

Languages updated: Python, NodeJS, PHP, C#, Go, Java, Ruby, PowerShell

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Update BASE_URL constant from https://www.turbodocx.com/turbosign
to https://api.turbodocx.com across all 44 API example files.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Ensure all TurboSign API example files have consistent constant declarations.
Added missing DOCUMENT_NAME constants to step3-prepare files for:
- Python (FastAPI and Flask)
- NodeJS (Express and Fastify)
- PHP
- Go

All 44 files now have uniform constant structure at the top.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Replace remaining hardcoded "YOUR_API_TOKEN" and "YOUR_ORGANIZATION_ID"
with proper constant references in the Go complete-workflow example.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@nicolasiscoding nicolasiscoding merged commit 3c0a798 into develop Sep 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants