API - Favorites synchronization
The favorites synchronization API aims to allow festival goers to store and synchronize the events and artists they put in their favorites across all platforms (goevent web (web or on facebook), goevent mobile (ios, android))
This is particularly useful when festival goers put some events and artists in their favorites on the festival's website, and wants to retrieve them on their mobile devices using the mobile app on the festival's site.
There are 3 mains functions offered by the favorites synchronization API: authenticate the user, list a user's favorites, and update a user's favorites.
Authentication
When the user wants to enable the favorites synchronization for an event, either via the website or the mobile app, he or she is asked to sign in via Facebook. This creates a Greencopper user account which can then be used to store and synchronize the user's favorites.
Facebook app management
The Facebook app is created and managed by Greencopper.
Before trying to call the API, you must ensure you get your <Facebook app ID> from Greencopper team.
Authentication mechanism
All calls to the API are based on the same authentication mechanism.
This is an authentication based on Facebook token and signed request, and several verifications are done on each request.
More information on the authentication mechanism.
Endpoint
Endpoint main URL
https://api3.greencopper.com/account/<project-tag>/
The <project-tag> parameter identify your project in a unique way.
Before trying to call the API, you must ensure you get your <project-tag> parameter from Greencopper team.
Main endpoint URLs
- POST /user/ - Login of a user
POST /user-<upid>/favorites/list/ - List of favorites of a user
- POST /user-<upid>/favorites/update/ - Update of a favorite of a user
FAQ
If you encounter any issue with the implementation, please have a look to the Frequently Asked Questions.
Otherwise, you can contact Greencopper team, we will be happy to help you.
General sequence diagram
Below a sample sequence diagram from login of the user, to an update of its favorite after getting its list.