Download the PHP package translations-com/globallink-connect-api-php without Composer
On this page you can find all versions of the php package translations-com/globallink-connect-api-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download translations-com/globallink-connect-api-php
More information about translations-com/globallink-connect-api-php
Files in translations-com/globallink-connect-api-php
Package globallink-connect-api-php
Short Description GlobalLink Connect API for PHP
License Apache License 2.0
Homepage http://www.translations.com
Informations about the package globallink-connect-api-php
GlobalLink Connect PHP SDK
A PHP SDK for the GlobalLink Enterprise REST API, enabling seamless integration with TransPerfect's GlobalLink translation management platform.
Features
- Complete API Coverage: All REST API endpoints for projects, submissions, targets, and downloads
- OAuth2 Authentication: Automatic token management and refresh
- Type Safety: Full PHP 8.3+ type hints and strict typing
- Error Handling: Typed exception hierarchy for precise error handling
- Rate Limiting: Built-in rate limit tracking and handling
- Pagination: Support for paginated API responses (pageSize: 20-200)
Available Endpoints
| Category | Endpoints |
|---|---|
| Health & Info | healthcheck(), getInstanceInfo() |
| Projects | getProjects(), getProject(), getProjectFileFormats(), getProjectWorkflows(), getProjectCustomAttributes(), getProjectLanguageDirections(), getProjectOrgUsers(), getProjectMslaLevels() |
| Submissions | createSubmission(), getSubmissions(), getSubmission(), getSubmissionWordcount(), patchSubmission(), saveSubmission(), cancelSubmission() |
| File Upload | uploadSubmissionSourceFile(), uploadSubmissionReferenceFile() |
| Tech Tracking | putSubmissionTechTracking() |
| Targets | getTargets() |
| Downloads | downloadTargetDeliverable(), downloadSubmissionDeliverables(), downloadSubmissionOnlyDeliverables(), downloadSubmissionDeliverablesByLanguages(), downloadSubmissionDeliverablesByTargetIds() |
| Delivery | confirmTargetDelivery() |
Requirements
- PHP 8.3 or higher
- Composer (for dependency management)
No additional PHP extensions are required. The SDK uses PHP's built-in stream functions for HTTP requests.
Installation
Clone the repository and install dependencies:
To use as a dependency in another project, add to your composer.json:
Then run composer update transperfect/globallink-connect-php.
Quick Start
Configuration
Set your GlobalLink credentials as environment variables before running any script:
To use a .env file, load it before creating the client. For example, with vlucas/phpdotenv:
Or copy .env.example to .env and load variables manually.
Basic Usage
API Reference
Authentication
The client automatically handles OAuth2 authentication and token refresh. Tokens are refreshed automatically when they expire.
Health Check
Instance Information
Projects
Submissions
Targets
Error Handling
The SDK provides a typed exception hierarchy:
Rate Limit Information
Advanced Usage
Custom HTTP Client
You can inject a custom HTTP client for testing or to use a different HTTP library:
Custom User-Agent
Retry Configuration
Enable automatic retries for transient failures (429 rate limit, 5xx server errors):
Examples
The SDK includes comprehensive example scripts demonstrating all functionality:
| Example | Description |
|---|---|
examples/01-projects.php |
Health check, instance info, projects, file formats, workflows, language directions, custom attributes, organization users, MSLA levels |
examples/02-submissions.php |
Create submissions, upload source/reference files, tech tracking, save, wordcount, cancel |
examples/03-targets.php |
Poll targets, pagination, download deliverables, bulk downloads, confirm delivery |
Run examples from the project root after setting credentials:
Pagination
The GlobalLink API uses pagination for list endpoints. Important notes:
pageSizemust be between 20 and 200 (default: 50)pageNumberis 0-indexed (default: 0)- The SDK automatically clamps
pageSizevalues to the valid range (20-200) - See API pagination documentation
Running Tests
Integration Tests Setup
-
Copy
.env.test.exampleto.env.test: -
Edit
.env.testand fill in your GlobalLink sandbox credentials: - Run integration tests:
Contributing
This repository is maintained exclusively by TransPerfect. External contributions such as pull requests are not accepted. If you encounter a bug or have a feature request, please contact your TransPerfect representative or reach out via GlobalLink Support.
Security
If you discover a security vulnerability in this SDK, please report it responsibly. Do not open a public GitHub issue for security vulnerabilities.
Instead, please contact TransPerfect directly at [email protected] with:
- A description of the vulnerability
- Steps to reproduce the issue
- Any potential impact
We will acknowledge receipt within 3 business days and work to address verified vulnerabilities promptly.
License
This software is proprietary and confidential. Unauthorized copying, distribution, or use is strictly prohibited.
Copyright (c) TransPerfect. All rights reserved.
Support
For support, please contact your TransPerfect representative or visit GlobalLink Support.