sandbox endpoints
better handling of errors for sandbox
download endpoint
actually use the variables...
fix