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
Create Group
Purpose of the create Group API
Use this API to create a group.
Endpoint
Authentication: required
POST /group/create.json
Parameters
- name (required), The name of the group to create
- members (optional), i.e. jaisen@jmathai.com,hello@openphoto.me - A comma delimited list of email addresses
Examples
Command Line (using openphoto-php)
./openphoto -p -X POST -h current.openphoto.me -e /group/create.json -F 'name=My Group' -F 'members=jaisen@jmathai.com'
PHP (using openphoto-php)
$client = new OpenPhotoOAuth($host, $consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret);
$response = $client->post("/group/create.json", array('name' => 'My Group', 'members' => 'jaisen@jmathai.com'));
Response
The response is in a standard response envelope.
- message, A string describing the result. Don't use this for anything but reading.
- code, 200 on success
- result, A Group object or FALSE on error
Sample
{
"message":"",
"code":200,
"result":
{
id: 'a',
appId: 'current.openphoto.me',
name: 'My Group',
members: ['jaisen@jmathai.com','hello@openphoto.me']
}
}