Help us understand the problem. What is going on with this article?

ターミナルからgyazoに画像をアップロードする

More than 5 years have passed since last update.

ドキュメントが間違っていたみたいで地味にハマって別のAPI使って解決していましたが、この度お問い合わせの返信が来て解決しました(2014/11/10時点)。

https://gyazo.com/api?lang=ja

ユーザー登録

https://gyazo.com/signup

アプリケーションを登録

https://gyazo.com/oauth/applications

New Applicationから

new app

NameとCallback URLは適当に

create app

あとは作成したアプリケーションの詳細に飛んで、Access TokenをgenerateすればOKです。

APIを叩く

ドキュメントにあるようにクエリとしてAccess Tokenをつけると失敗します。

$ curl -i https://upload.gyazo.com/api/upload?access_token=YOUR_ACCESS_TOKEN \
          -F "imagedata=@/home/gyazo/greaetpicture.png"
{"message":"You are not authorized."}

問い合わせたらAccess tokenはクエリに含めても認識しないとのこと。
以下のようにしたら成功しました。

$ curl -i https://upload.gyazo.com/api/upload -F access_token=YOUR_ACCESS_TOKEN \
          -F "imagedata=@/home/gyazo/greaetpicture.png"

今後どちらかが修正されるといいですね。

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away