Error 403 - sharing post&photo


I’m trying to do api that will share my short post and photo. I’m getting this error:
You are trying to load data from a www stream which had the following error when downloading.
403 Forbidden

I’m doing it in Unity. When I was sharing only text - it was working. When I changed a code to share media - I don’t know why it stopped work. That’s fragment of my code:

 Dictionary<string, string> parameters = new Dictionary<string, string>();
            parameters.Add("status", text);
			parameters.Add ("media[]", texture);
            // Add data to the form to post.
            WWWForm form = new WWWForm();
            form.AddField("status", text);
			form.AddField("media[]", texture);
            // HTTP header
            var headers = new Hashtable();
            headers["Authorization"] = GetHeaderWithAccessToken("POST", PostTweetURL, consumerKey, consumerSecret, response, parameters);

           	WWW web = new WWW(PostTweetURL,, headers);
            yield return web;

            if (!string.IsNullOrEmpty(web.error))
				Debug.Log(string.Format("PostTweet - failed. {0}\n{1}", web.error, web.text));

I’m basing on this

I don’t have authorization mistakes etc, everything works, I’m getting tokens etc. I just have ERROR403. I have chosen all permissions - it didn’t help. Any ideas? I’m trying to do it since week and I completely lost ideas.


If you are adding media to your tweet, you will need to use a different URL endpoint (upload) to the one that you would use just for text (statuses/update). What is PostTweetURL set to, and have you modified the code to deal with this?


My PostTweetURL is: So I think it’s right?


That does look right, although that endpoint is now deprecated and replaced with the two stage upload, then update.

I’m not familiar with the original Unity code so I’m afraid I can’t comment on what else might need to be changed. Maybe the original blog author can help here?


Actually everything looks good (I found result in comments: but I’m getting code 195. I read anywhere that’s because I’m in Poland. Is it true? It means that I can’t share photo from Poland with your sdk?
Mistake sounds: PostTweet – failed.

{"errors":[{"code":195,"message":"Missing or invalid url parameter."}]}


I am not aware of any issue with posting images from specific countries, what have you read on this?