Documentation
- Installation
- Ubuntu and Apache
- OSX and Macports
- AWS EC2 using an AMI
- SUSE and Apache
- API FAQs
- General FAQs
- Authenticating with OAuth 1.0a
- How photos are generated
- How to get specific photo sizes
- Test APIs
- GET /hello.json
- Action APIs
- POST /action/:id/create.json
- POST /action/:id/delete.json
- Activity APIs
- GET /activities/list.json
- Photo APIs
- POST /photo/:id/delete.json
- POST /photo/:id/update.json
- GET /photos/list.json
- GET /photo/:id/view.json
- GET /photo/:id/nextprevious.json
- POST /photo/upload.json
- Tag APIs
- GET /tags/list.json
- POST /tag/:id/create.json
- GET /tags/:id/update.json
- Group APIs
- GET /group/:id/view.json
- GET /groups/list.json
- POST /group/:id/create.json
- POST /group/:id/delete.json
- GET /groups/:id/update.json
- Webhook APIs
- POST /webhook/subscribe
- GET /webhook/:id/view.json
- POST /webhook/:id/delete.json
OpenPhoto documentation
Getting set up with a site or account
We've made it really easy for you to get set up with an OpenPhoto site. Click on any of the get started links or follow one of the installation guides to the left.
Download one of the API libraries
You can grab any of our API libraries to make it really easy to hit the ground running.
Using the PHP library you can make a command line call to the test API.chmod u+x openphoto
./openphoto -vp -h example.com -e /hello.json
You should see something like this.
==========
Method: get
Host: example.com
Endpoint: /hello.json
==========
{
"message" : "Hello, world!",
"code" : 200,
"result" : {
"__route__" : "\/hello.json",
"oauth_consumer_key" : ""
}
}
Get your OAuth tokens
The easiest way to create an app and get the OAuth tokens is to browse to your OpenPhoto site and go to /v1/oauth/flow.
Follow the prompts until you get a success message.
Then go to /manage/apps and you should see the following parameters:
- Consumer Key
- Consumer Secret
- OAuth Token
- OAuth Secret
Use your OAuth tokens to make authenticated calls
First, call the same endpoint as before with an additional parameter auth=true.
./openphoto -vp example.com -e /hello.json -F 'auth=true'
You should get an unauthorized 403 code.
==========
Method: get
Host: current.openphoto.me
Endpoint: /hello.json
==========
{
"message" : "You do not have sufficient permissions to access this page.",
"code" : 403,
"result" : null
}
Now export your OAuth credentials and run the command again.
export consumerKey=your_consumer_key
export consumerSecret=your_consumer_secret
export token=your_oauth_token
export tokenSecret=your_oauth_token_secret
./openphoto -vp example.com -e /hello.json -F 'auth=true'
You should see a successful response.
==========
Method: get
Host: current.openphoto.me
Endpoint: /hello.json
==========
{
"message" : "Hello, world!",
"code" : 200,
"result" : {
"__route__" : "\/hello.json",
"auth" : "true",
"oauth_consumer_key" : "7f66a2854e521114d3914753a6964c"
}
}
Go build something!
Everything we've built has been on top of this API. It's the core of the software and we can't wait to see what you come up with.