Question & Answer
Question
Custom Theme export fails with :
curl -k -X 'POST' -H "Authorization: bearer ey<hide_me>qg" -H 'Accept: application/yaml' 'https://apim.mgmt.apic.<hide_me>.ibm.com/portal/catalogs/porg1/subin/custom-theme/export'
status: 401
message:
- Failed to authenticate management route
errors:
- >-
error during JWT token validation: TypeError: Cannot read properties of null
(reading 'header')
Cause
The issue is Header Case Sensitivity. In the failed request, the Authorization header is written as:
'Authorization: bearer <token>'
'Authorization: bearer <token>'
For a successful call, it should be :
'Authorization: Bearer <token>'
'Authorization: Bearer <token>'
OAuth 2.0 tokens are case-sensitive, and the correct scheme is Bearer with a capital B. Using lowercase bearer can cause the server to reject the token.
Answer
To resolve the issue using Bearer with a capital B. Here is an example:
curl -k -X 'POST' -H "Authorization: Bearer ey<hide_me>qg" -H 'Accept: application/yaml' 'https://apim.mgmt.apic.<hide_me>.ibm.com/portal/catalogs/porg1/subin/custom-theme/export'
status: 201
message:
stdout: '/catalogs/dc75eb72-4aed-4833-9424-c2311fc4a242/0dd3beac-fa05-47f9-8901-7c65fcbc1b54/custom-theme/export/cjtbklv34j7ngxgz/status'
stderr: ''
errors: []
[{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSMNED","label":"IBM API Connect"},"ARM Category":[{"code":"a8mKe000000CaZYIA0","label":"API Connect-\u003EAPIC Portal"}],"ARM Case Number":"TS020473000","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"and future releases;10.0.5"}]
Was this topic helpful?
Document Information
Modified date:
08 October 2025
UID
ibm17247463