Public API¶
Everything which mobile apps can do can be done via API. We are using Firebase Realtime Database as a backend. You can use any Firebase SDKs or REST API to work with the data.
For more details see
Environments¶
We strongly recommend developing on our sandbox server to minimize impact of errors. Contact us if you want a build of an Android app which is connected to the sandbox server. Or use sandbox web app for creating test groups etc.
Sandbox¶
- URL: https://settle-up-sandbox.firebaseio.com
- Web App: https://settle-up-sandbox-app.web.app/
- Web API key:
AIzaSyCfMEZut1bOgu9d1NHrJiZ7ruRdzfKEHbk - Google Client ID:
84712828597-2qtp21av10di421c5d16ib8e5508au03.apps.googleusercontent.com(localhost:3000 - is whitelisted there) - Facebook app ID:
327675517252504
Live¶
- URL: https://settle-up-sandbox.firebaseio.com
- Web App: https://settleup.app/
- Web API key: (test it on sandbox first and then contact us for production API key)
Authentication¶
Most of the requests need to be authenticated. We don’t allow unbounded access via a public API, you should authenticate as some Settle Up user. Use Firebase Authentication to sign in the user and then pass it to the REST API according to this guide.
Example¶
The easiest authentication is with email/password auth provider. For example in Javascript and using Firebase Auth library, it’s just a few lines of code.
REST API¶
If you choose REST API we recommend first reading General documentation to Firebase REST API.
Reading and writing data can then be done using GETs (reading), PUTs (writing) and POSTs (creating entities). Examples:
- GET
https://<environment>.firebaseio.com/permissions/<group_id>.jsonreturns list of people with access to a group - POST
https://<environment>.firebaseio.com/members/<group_id>.jsoncreates a new member (will be located at/members/<group_id>/<new_member_id>) - PUT
https://<environment>.firebaseio.com/members/<group_id>/<member_id>.jsonupdates an existing member
For list of data types see data entities.