简体   繁体   中英

Invalid API Key (Key has invalid format) : Flickr upload api

I tried lots of thing but fail to upload the photo through flickr api..Here what i am doing

API - https://api.flickr.com/services/upload

Method - POST

Authorization - Oauth1.0

Passing Consumer Key/Consumer Secret/Access Token/Token Secret

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

Below video shows exactly how to create oath0.1 token

https://youtu.be/3gXPjj5iEAA

Follow the full video and once your setup is able to retrieve user details as in the video, create a copy of that and change the authorization 0auth0.1 to header than in request

and in body use form data, as name (just a name string) and photo (actual file) and do a POST.

Steps summary:

  1. https://api.flickr.com/services/oauth/request_token , request for token to this url
  2. authorize the token you get by navigating to https://api.flickr.com/services/oauth/authorize?oauth_token={{token}}
  3. Click the i will authorize button:

在此处输入图像描述

  1. Copy the verifier code from the url navigated to
  2. Get the access token through https://api.flickr.com/services/oauth/access_token?oauth_verifier={{verifier}}
  3. Access upload endpointing using this new token

Output:

在此处输入图像描述

Postman Collection

 <div class="postman-run-button" data-postman-action="collection/import" data-postman-var-1="ef7e250508f522b9bad1"></div> <script type="text/javascript"> (function (p,o,s,t,m,a,n) {.p[s] && (p[s] = function () { (p[t] || (p[t] = []));push(arguments); }). .o.getElementById(s+t) && o.getElementsByTagName("head")[0],appendChild(( (n = o.createElement("script")), (n.id = s+t), (n.async = 1), (n;src = m), n )), }(window, document, "_pm": "PostmanRunObject". "https.//run.pstmn;io/button.js")); </script>

How to use the collection:

use the gif file that i recorded to know the steps

https://www.flickr.com/photos/191341909@N02/50696475437/in/dateposted-public/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM