Hello, I have a question, i hope you can help me with the following.
We are currently developing a mobile application, and we are connecting that mobile application to the bubble database through API workflow. But we have a problem, when a user registers or login, a token is generated.
We have user registration and the user can register a car, but at the time of registering it, Created By is not captured, how can I do so that when a registered user publishes a car, the Created By is registered.
Hey,
Not sure if I 100% understand the issue (and I’m not a Bubble expert yet) but if you authenticate the user while making the call to your API workflow which creates the listing, the “Created By” field should be set automatically.
Currently, your workflow is set to run even without authentication so if you’re not passing the user’s API token or email/password, then I assume “Created By” can turn up empty.
I’m developing a native iOS app and I want to connect it to my app database in bubble.io.
I created an api for user registration and login, when I test it in postman it generates a token.
My question is how to relate this token generated by a login so that the user can publish a car and in the database is saved in Created by the logged user.
What I can’t figure out, is how to use the user_id and token to still authenticate the car registration with the logged in user What do I do with user_id and token?
You don’t need the user_id. When calling your endpoint, you can pass the token in a parameter
https://[domain]/api/1.1/wf/[endpoint]?api_token=[token]
or in the header: Authorization: Bearer [token].
I think I myself struggled with finding out what’s the url parameter as it was not documented well, or at all.