Jul 09, 2023 08:47 AM
I would like to build a mobile app that tracks user's habits and stores the data in AirTable account of the user.
I want to use react-native framework because I want the app to be able to store the data in different services (eg. google sheets).
At the moment it isn't clear to me if the AirTable API policies will allow me to insert records into user's tables?
My initial tests came accross Cross-Origin Resource Sharing issues.
Can somebody enlighten me if what I am after is in principle possible?
Thank you.
Jul 09, 2023 12:56 PM
Hi @antolikjan
Are you using the OAuth method to allow your user's to grant you access to the Airtable API on their behalf?
If so, did you ensure to request "write" scope for the token?
Jul 11, 2023 03:26 AM
I am using the Expo React Native framework to write the app.
Upon successfully passing the first authorization step where user grants access to the table I am making following FETCH call to retrieve the authorization token:
Jul 11, 2023 07:23 AM
Hi @antolikjan
Based on the error it seems you are attempting to make the API call from the user's browser.
All API calls made during the OAuth process should be made from your server NOT browser
Try replicating the OAuth flow with Postman. It might involve some manual work in terms of creating the URL etc, but it should hopefully help you understand how Airtable is handling OAuth.
Jul 11, 2023 08:07 AM
That is the point of my question - I am building an standalone Mobile App (there is no server), which would record daily habits and store them in user's Airtable table. Do I understand it correctly that this is essentially impossible, because I would have to have a separate back-end running on a server that would be handling this saving due to the Airtable API policies?