API Documentation
API Upload (POST w/ OAuth Echo)
-
How to regegister API
To get your API key click here -
Description
This API is used for upload photos from your application. -
URL
Application should post image and necessary header to following URL.
XML format
http://propic.com/photos/upload.xml
JSON format
http://propic.com/photos/upload.json
-
Fields to post in header
consumer_key (required) - Twitter consumer key
consumer_secret (required) - Twitter consumer secret
media (required) - Binary image data
application key (required) - Your ProPic API key
message (optional) - Message to post to twitter. The URL of the image is automatically added.
-
Sample header need to add
OAuth realm="http://api.twitter.com/",
oauth_consumer_key="Asxdd&HN4OA7A*n1ozfyhA",
oauth_signature_method="HMAC-SHA1",
oauth_token="75267827-yqUybzvuABucfY1FD7q3jnBWcS2xImFALidyfD9LB",
oauth_timestamp="1304518910",
oauth_nonce="40697631baa4045a47245f947fc21b88",
oauth_version="1.0",
oauth_signature="it0TkgZC2fXFRtqtYU73X19weZA%3D" -
Response
XML
<?xml version="1.0" encoding="UTF-8"?> <rsp status="ok"> <mediaid>f2a</mediaid> <mediaurl>http://propic.com/2a</mediaurl> </rsp>
JSON
{ "status" : "ok", "mediaid" : "f2a", "mediaurl" : "http://propic.com/2a", }
-
Error codes and their descriptions
1001 - Invalid twitter consumer key or consumer secret
1002 - Image not found
1003 - Application key not valid
-
Resource
PHP
To get your sample code click here -
Image thumbnails
Use the following URL structure to add ProPic thumbnails into your app
http://propic.com/pages/home <type><image-id>
Type:
e2 or fe2
Example:
http://propic.com/e2a
*Note:
ProPic Community Guidelines specify that if you use a ProPic thumbnail in your app, the photo must link back to its original photo page or a link to the original photo page must be provided somewhere within context to the thumbnail -
How do I get "from [my_application]" appended to updates sent from my API application?
You need to fill the API form with the necessary details, after you submitting that form we will send a unique application key to your mail. Using that key you can upload through your applications. To get your API key click here