Fix OMG API authorization header and private property access
Fixed two issues: 1. Removed 'Bearer' prefix from Authorization header (OMG API expects just the key) 2. Fixed private property access error (hardcoded endpoint URL instead of accessing $omgService->config) OMG API now sends: Authorization: PeyJvcmciOiIy... Instead of: Authorization: Bearer PeyJvcmciOiIy... 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e9a175ef5d
commit
6c8c8ea508
2 changed files with 2 additions and 2 deletions
|
|
@ -39,7 +39,7 @@ class OMGService {
|
|||
CURLOPT_TIMEOUT => $this->timeout,
|
||||
CURLOPT_HTTPHEADER => [
|
||||
'Content-Type: application/json',
|
||||
'Authorization: Bearer ' . $this->apiKey
|
||||
'Authorization: ' . $this->apiKey // Send API key directly (not "Bearer")
|
||||
]
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ try {
|
|||
'details' => $projectResult['details'] ?? '',
|
||||
'action' => $projectResult['action'] ?? 'Check OMG API configuration',
|
||||
'httpCode' => $projectResult['httpCode'] ?? 0,
|
||||
'endpoint' => $omgService->config['base_url'] . '/getProject?project_number=' . $campaignNumber,
|
||||
'endpoint' => 'https://api2.omg.oliver.solutions/loreal/v1/getProject?project_number=' . $campaignNumber,
|
||||
'progress' => $progress
|
||||
]);
|
||||
exit;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue