I am trying to connect to the metadata Api via a python script. Essentially, I am authenticating into the SOAP Api, getting a session Id, then setting the session if in my Metadata client class. This works well for production orgs but when trying to connect to the metadata api for a sandbox, I keep getting an "invalid session id" error. Perhaps the URL is wrong? If so I cannot figure out how to set it.
Thanks in advanced!