api 401 Unauthorized when in product env

I test the api in sandbox env. It works fine.

curl --location 'https://api.storekit-sandbox.itunes.apple.com/inApps/v1/notifications/history' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsImtpZCI6Ij......' \
--data '{
    "startDate":1693324766487,
    "endDate"  :1693324766587
}'

But in production env , it return 401 Unauthorized error.

My app is not publish to the apple store.

How could i confirm [errorCode 4040005] like follow steps:

If you don’t have environment information, follow these steps:

Call the endpoint using the production URL. If the call succeeds, the original transaction identifier belongs to the production environment.

If you receive an [errorCode 4040005] with errorMessage as OriginalTransactionIdNotFoundError, (or HTTP response code 404 from the Send Consumption Information endpoint), call the endpoint using the sandbox environment.

If the call succeeds, the original transaction identifier belongs to the sandbox environment. If the call fails with the same error code, the original transaction identifier isn’t present in either environment.
api 401 Unauthorized when in product env
 
 
Q