A document can be dowloaded via the api function or via curl Some sites treat downloadMedia and curl differently Investigate why this is and find a solution