Trying to deploy/retrieve/validate the metadata with Ant scripts to sandbox environment and it gives me the below error: Error: Failed to login: UNSUPPORTED_API_VERSION - Invalid Api version specified on URL Sandbox API version: 36.0 CustomPackage.xml API version: 36.0 (I did tried with 35 also) It is working with another sandbox with APT version 37.0 Answer: I faced same issue and resolved it by downloading similar version ( what my org was having) of ant-salesforce jar file and put that in to lib folder of apache ant folder. Here is the below URL you may download Note: Here you may put any version number in place of 'nn' in below URL as per your org you are working with https://gs0.salesforce.com/dwnld/SfdcAnt/salesforce_ant_nn.0.zip for example for for 36.0 https://gs0.salesforce.com/dwnld/SfdcAnt/salesforce_ant_nn.0.zip Searches related to failed to login: unsupported_api_version - invalid api version specified on url invalid api version specified on url data loader invalid api version specified on url ant invalid api version:0.0 salesforce force.com migration tool download migration tool salesforce salesforce api version