- Fix API payload: "contents" not "content", "align" not "alignment", output type "vnd.adobe.photoshop" not "image/vnd.adobe.photoshop" - Remove broken font size /72 conversion (values already in points) - Add automatic font upload from fonts/ directory to GCS - Add FuturaPT-Demi.otf extracted from Adobe CoreSync - Update GCS bucket to lor-txt-tmp-bkt-26 (old billing expired) - Update HOW-IT-WORKS.md with working API docs, font setup guide, bug fixes, and verified test results Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
No EOL
1.3 KiB
Python
37 lines
No EOL
1.3 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Adobe API Configuration
|
|
|
|
This file contains configuration values for the Adobe API.
|
|
In production, these values should be stored securely,
|
|
either in environment variables or a secure configuration store.
|
|
"""
|
|
|
|
# Adobe API Credentials
|
|
ADOBE_CLIENT_ID = "f34becb759244899bd73b86220f6fb92"
|
|
ADOBE_CLIENT_SECRET = "p8e-AGmZ6TSfKhkgiTzhn3_yxw0JSV_yT_Cb" # Client secret confirmed working
|
|
|
|
# GCS configuration
|
|
GCS_BUCKET_NAME = "lor-txt-tmp-bkt-26"
|
|
GCS_KEY_PATH = "gcs_key.json"
|
|
|
|
# Default API scopes for Photoshop REST API
|
|
DEFAULT_SCOPES = "openid,AdobeID,read_organizations"
|
|
|
|
# Alternative scopes for Firefly REST API
|
|
FIREFLY_SCOPES = "openid,AdobeID,firefly_api,ff_apis"
|
|
|
|
# Adobe API Endpoints
|
|
ADOBE_TOKEN_URL = "https://ims-na1.adobelogin.com/ims/token/v3"
|
|
ADOBE_USERINFO_URL = "https://ims-na1.adobelogin.com/ims/userinfo"
|
|
|
|
# Adobe Photoshop REST API Endpoints (image.adobe.io)
|
|
# These are the correct endpoints confirmed by testing
|
|
PHOTOSHOP_TEXT_ENDPOINT = "https://image.adobe.io/pie/psdService/text"
|
|
PHOTOSHOP_CROP_ENDPOINT = "https://image.adobe.io/pie/psdService/productCrop"
|
|
|
|
# Firefly API Endpoints
|
|
FIREFLY_UPLOAD_ENDPOINT = "https://firefly-api.adobe.io/v2/upload"
|
|
|
|
# Note: Adobe does not provide endpoints to generate pre-signed URLs
|
|
# External storage providers (S3, Azure, etc.) should be used for this purpose |