2

I am building a local application using Excel to post a message with a chart to StockTwits using the API. Since the file is local and API calls for this syntax to upload a Chart:

curl https://api.stocktwits.com/api/2/messages/create.json -F access_token=<access_token> -F body="Creating a new message with a chart. \$ticker" -F chart=@/path/to/a/local/image/file.jpg

My JASON body text looks as follows:

{"body":"Testing a post for $WDC with a chart testing two again to see if this works","chart":"file://C:/My_Folder/My_File.png"}

However when I POST this to the API I get the following error:

{"response":{"status":422},"errors":[{"message":"There was a problem with the URL. Please check to make sure the provided URL is valid"}]}

What is incorrect in my local file syntax?

finefoot
  • 9,914
  • 7
  • 59
  • 102

0 Answers0