Re: Getting BadRequest (Unauthorized) error from ESM rest api v2 during get query result
This is actually very interesting... Are you using python ?
I would suggest to add a exception handling part, re-login, re-do you query (qryExecuteDetail + wait qryGetStatus), and continue fetching the pages from the 14th until the next unauthorized error, and so on...
Here is a list of string matches that can be use to detect various authorization errors from ESM responses text :
"Not Authorized User",
"Username and password cannot be null",
Are you getting one of those ?
If you are using python, I recommend you to check out msiempy, the ESM API python wrapper. It can significantly reduce your time spent coding script for the ESM API !
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.
Community Help Hub
New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.