When you decode the above base64 encoded Authorization header value you'll find <operator>:<password> inside. If the same pair of credentials work on both Training and Staging you should be able to get a response from offlinehttp service package.
Yes you can generate credentials in your script. Just them with colon, encode, prefix with 'Basic ' and set as Authorization header value in your request.
Thank you Mateusz. Now we are able to get the successful response.
1. As per article, we are planning on generating different installation ID for each payload with /pzSynchronization request. But we don't see any work ID's (py ID's or LEAN enrollment confirmation numbers) are coming to our Database. Is that expected?
2. Do we need to generate the separate pyEvent ID or pyID for each request?
The "actions" section of your payload defines the actions that would be performed on the server as the result of the request. I can see you included "createNewWork" action in your payload, so new work should be created for each request. Please try to make the requests unique to the extent that your case creation logic expects it, and new work should be actually created in the database.