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. You can use sandbox web app to create test users, test groups etc. Or Contact us if you want a build of an Android app which is connected to the sandbox server.
To get API keys, register your app in the developer portal. The sandbox key is shown right after registration; a live key is issued per app once you request it there and we review the request.
Sandbox¶
- URL: https://settle-up-sandbox.firebaseio.com
- Web App: https://settle-up-sandbox-app.web.app/
- Web API key: shown in the developer portal after you register your app
- Google Client ID:
84712828597-2qtp21av10di421c5d16ib8e5508au03.apps.googleusercontent.com(localhost:3000 - is whitelisted there) - Facebook app ID:
327675517252504
Live¶
- URL: https://settle-up-live.firebaseio.com
- Web App: https://settleup.app/
- Web API key: dedicated per app — test on sandbox first, then request it from the developer portal
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. If you are building a script just for you and your user has Google sign in, we recommend migrating to email/password, it's much easier to integrate. Contact us for that.
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.