cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

File Exchange token because a valid token is missing(Always worked before)

I've used File Exchange for a long time to upload my listings. Now I get an error about not having a valid token. I thought the tokens never expire. Do I have to get a new one? I can't seem to find out what to do on this.

Message 1 of 11
latest reply
1 BEST ANSWER

Accepted Solutions

File Exchange token because a valid token is missing(Always worked before)

Here is a direct link to the token process...https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&runame=F-FILEEXL51P1EHH6L899Q9B969GE134DK-FileUpload

 

You will have to replace the token from the above process into your scripts.

eBay is continually updating this site. Some advice given may have changed. Please reply to this thread, to let us know if this advice works for you. The links on the bottom of any eBay page can help you deal with most eBay issues. Contact eBay Customer Service on Facebook.com/eBay or Twitter.com/AskeBay

View Best Answer in original post

Message 3 of 11
latest reply
10 REPLIES 10

File Exchange token because a valid token is missing(Always worked before)

Tokens are good for 18 months.

 

To obtain a new one...

 

You can also find the instructions on page 67 of the File Exchange Advanced Instruction Guide here: 

http://pics.ebay.com/aw/pics/pdf/us/file_exchange/File_Exchange_Advanced_Instructions.pdf

 

Solution courtesy of Brooke@ebay

eBay is continually updating this site. Some advice given may have changed. Please reply to this thread, to let us know if this advice works for you. The links on the bottom of any eBay page can help you deal with most eBay issues. Contact eBay Customer Service on Facebook.com/eBay or Twitter.com/AskeBay
Message 2 of 11
latest reply

File Exchange token because a valid token is missing(Always worked before)

Here is a direct link to the token process...https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&runame=F-FILEEXL51P1EHH6L899Q9B969GE134DK-FileUpload

 

You will have to replace the token from the above process into your scripts.

eBay is continually updating this site. Some advice given may have changed. Please reply to this thread, to let us know if this advice works for you. The links on the bottom of any eBay page can help you deal with most eBay issues. Contact eBay Customer Service on Facebook.com/eBay or Twitter.com/AskeBay
Message 3 of 11
latest reply

File Exchange token because a valid token is missing(Always worked before)

Thanks Dolly, Its been so long since I went through that process.

 

   One of these days I need to do a "How to use Excel VBA to upload listings with File Exchange". That would be a big time project. 

 

Scooterdog

Message 4 of 11
latest reply

File Exchange token because a valid token is missing(Always worked before)

"How to use Excel VBA to upload listings with File Exchange" < good idea!

 

I use PHP to create/upload csv files.

 

Would your process upload directly from the xls file, or would you have to create the csv file first? This could be a time saver for some members.

 

Does your script download/examine the upload results file for errors, and report to user?

eBay is continually updating this site. Some advice given may have changed. Please reply to this thread, to let us know if this advice works for you. The links on the bottom of any eBay page can help you deal with most eBay issues. Contact eBay Customer Service on Facebook.com/eBay or Twitter.com/AskeBay
Message 5 of 11
latest reply

File Exchange token because a valid token is missing(Always worked before)

When I first started selling I put all of my inventory in Excel. So using VBA was a natural progression to create the HTML for the listings. At first I used VBA to make a table that I copied to the clipboard to paste into Turbolister. Turbolister became so slow I decided to ditch it for file exchange. 

 

I have created a Master CSV with all of the Header Names. Then I made a form with tabs for Listings, Sales, Inventory, Reports etc etc Now I just select what I want to sell from list boxes and combo boxes and the code generates everything. Even the listing title, tables and also removes the stock from the mySQL database. Moving the inventory to mySQL allows me to use any programming lanquage to create file exchange uploads. Here is one of my listings... https://www.ebay.com/itm/282843368533

 I don't know any PHP but might take a look when I get the time.  As for downloading results. I error check the CSV file before it gets uploaded. It the server rejects the upload. I can trouble shoot this on my end. I am interested in getting downloads from file exchange to get things like sales and other things. I believe there is a way to process my sales. As it is now, I have an id# in my listing that I have to manually type in to process the sale to insert into mySQL. I'll bet there is a way to automate this process and save me some work. I'm still a novice at all of this so if anybody knows a better way please let me know.  Wow, that got kind of long winded. lol Hope some of this made sense.

 

Scooterdog

 

 

 

 

Message 6 of 11
latest reply

File Exchange token because a valid token is missing(Always worked before)

could you kindly update to the forum if the solution provided here worked for you.
Also kindly share the code sketch of the program you are using. I'm getting the same error even though i just received the token not long ago.
Message 7 of 11
latest reply

File Exchange token because a valid token is missing(Always worked before)

@sikalabs 

A token is usually set when you subscribe to File Exchange and will be utilized when uploading through eBay's File Exchange webpage. Sign up links can be found here:

https://community.ebay.com/t5/Tools-Apps/File-Exchange-Resources/m-p/29630234

 

However, I'm not familiar with the process if File Exchange files are uploaded through other means that might require some sort of passed parameter.

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 8 of 11
latest reply

File Exchange token because a valid token is missing(Always worked before)

Thanks for those details and yes, I already subscribed for a token and have been assigned one. I was hoping for your code example since you mentioned that your token used to work fine. By that I assume that you programmatically download and upload csv files to eBay file exchange which is the intended purpose for the token I believe.

Message 9 of 11
latest reply

File Exchange token because a valid token is missing(Always worked before)

@sikalabs 

 

The intended purpose of the token is to authorize any use of FileExchange, not just upload and downloading of files.

 

I recently had both FileExchange and Turbolister tokens expire. Both methods/programs became unusable until I re-subscribed (created a new token for each).

 

A token is an authorization for any program to modify your account or item info on your behalf.

 

Ok. You are asking for code examples. I have been uploading/downloading FileExchange csv files for years, multiple times each day. The following info works correctly.

 

To upload/download, I use cURL. My scripts are written in PHP, but I execute cURL as a MS-DOS process. You can use libcurl, but the return values from eBay are contained in a cookie. PHP can decode cookies, but I find that my way (which returns a text string), works best for me.

 

To upload a csv file to eBay's FileExchange.

 

// define function to build and upload to FileExchange

function upload_file($fileName,$token) {

				 $resultsArray=array();
				 $cmd = 'curl -k -o results.txt -F '.'"token='.$token.'" '.'-F "file=@'.$fileName.'"'.' https://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeUpload 2>&1';
				 exec($cmd,$resultsArray);
				 unset ($resultsArray);
				 // open results.txt, extract job no, then return job no
				 $cmd = 'type results.txt 2>&1';
				 exec($cmd,$resultsArray);
				 $findMe='Your ref # is ';
				 $pos = strpos($resultsArray[10], $findMe)+14;
				 $jobNo=substr($resultsArray[10],$pos,9);
				 unset($resultsArray);				 
				 return ($jobNo);
				 }

To download the FileExchange results file.

 

// define function to download results file from FileExchange

function download_file($jobNo,$token) {

				 $resultsArray=array();
				 $downLoad=false;
				 global $uploadResultFileName;
				 $cmd = 'curl -k -o '.$uploadResultFileName.' --data-urlencode "token='.$token.'" --data "jobId='.$jobNo.'"  https://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeProgrammaticDownload 2>&1';
				 $findMe='requested file was not found';
				 while (!$downLoad) {
				 			 exec($cmd,$resultsArray);
							 $workString = file_get_contents($uploadResultFileName);
							 $pos = strpos($workString,$findMe);
							 if ($pos==4) {
									writeLog ('File not ready. Waiting 2 min.');
									sleep (120);
									}
									else {
							 				 $downLoad=true;
											 }
							 unset($resultsArray);
							 }			 			 
				 return;
				 }

Special note here. eBay is not going to like it much, if you continually check for the results file. This is the reason for the 2 min. delay. Do not continually check for the file.  It may take several 2 min delays before the result file is available. FileExchange executes csv upload files quickly, but the reporting process (the results file) may take some time. I have seen 10 minutes or more before the results file is available.

eBay is continually updating this site. Some advice given may have changed. Please reply to this thread, to let us know if this advice works for you. The links on the bottom of any eBay page can help you deal with most eBay issues. Contact eBay Customer Service on Facebook.com/eBay or Twitter.com/AskeBay
Message 10 of 11
latest reply

File Exchange token because a valid token is missing(Always worked before)

Thanks for your feedback once again. Your example is really helpful.

Message 11 of 11
latest reply