title: Getting "Login required" from Apple VPP api
body: <p>Last week, seemingly out of nowhere, we started getting an error when we try to use the VPP api to assign licenses or anything else.</p>
  
  <p>{“errorNumber”:9601,“status”:-1,“errorMessage”:“Login required”}</p>
  
  <p>Does anyone know what this error means? The documentation mentions it, but doesn't explain why you would get it. Our customers upload their tokens to us that they download from apple's VPP portal and that enables VPP management for them. Recently, new and existing VPP accounts are failing with the error mentioned above. Thank you for your time.</p>
  
  <p><strong>Update</strong>:</p>
  
  <p>We call an endpoint apple provides to know what url's to use for the various api requests we can do. Supposedly they can change without notice so you are supposed to rely on the url's they give you back from this un-authenticated call:</p>
  
  <p><a href="https://vpp.itunes.apple.com/WebObjects/MZFinance.woa/wa/VPPServiceConfigSrv" rel="nofollow noreferrer">https://vpp.itunes.apple.com/WebObjects/MZFinance.woa/wa/VPPServiceConfigSrv</a></p>
  
  <p>The url's it's returning do not match what are in the documentation. If you send your parameters as querystring params to the url's that come back from that call, everything works. If you send the params as json like the documentation says you should and use those url's, you get the "Login required" error. If you send your params as json in the post body to the url's in the documentation, everything works. Querystring also works. Something has changed on their end and the support guy I talked to couldn't see it and wasn't willing to dig deeper. I'm working on talking to someone else. Here's the documentation for VPP for reference:</p>
  
  <p><a href="https://developer.apple.com/business/documentation/MDM-Protocol-Reference.pdf" rel="nofollow noreferrer">https://developer.apple.com/business/documentation/MDM-Protocol-Reference.pdf</a></p>