Skip to main content
← Data, API & Backend
Data, API & Backend August 19, 2022 · 5 replies

Query String Parameters

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

I have inbound traffic to my app using query string parameters. 

I need to collect these strings as they land on app. 

How can you do this in Bravo? 

Ideally I want to be able to create logic like I would in Google Tag Manager whereby, I could create a variable based on query string key = 'Bearer_Token', so key's value is stored to the variable. 

I know bravo have some form of a bearer_token variable, so my second q is; if I was to store a value in this variable. Would this impact firebase login authentication. I'm assuming that the bearer_token variable is only for custom API's and not firebase. Otherwise if I was to use this variable to store my value, it would cause issues with logged in users as the firebase token wouldn't validate the users session.

5 replies

Daniel August 19, 2022

Thank you for your response! 

I have a custom authentication provider separate to firebase.

In the app, the user signs up via firebase and then has to authentication via this external provider. I'm basically getting access to be able to read users emails as it's part of the apps service offering. 

I've managed to redirect the user off app to the authentication provider however because I've set this up client side, once the user has authenticated externally, they are then redirected back to the app and bearer token is stored in the query string parameter within the URL.

I need this bearer token in order to interact with the email API. 

So I need a way of being able to collect the value from the query string in the URL and store it to a variable, which I can then declare via an API. 

Hope this makes sense, if you need me to explain anything else, please let me know! 

I'm used to using Tag Management Solutions's like GTM or even code some JS which allows me to specify the key and collect the value easily but can't see to find anything query string related or URL related on the bravo community pages.

Divyansh August 19, 2022

ideally you want email-ids of users? or you are getting access via a 3rd party auth to read full emails(and not email ID) of users as your app service? I read your previous posts, so assuming you want it for signed in users and not for non-signed in users?

Daniel August 19, 2022

getting access via 3rd party auth to read emails. Would only be for signed in users.

The only way I can access the email API is using the bearer token and the only way I can get the bearer token from the 3rd party auth, is via the URL (Query String) as they land back on the app.

e.g. https://apps-service.bravostudio.app?**token=1234abcd**

The first session of the app would just need the bearer token taken from the url's query string and stored to a bravo variable, allowing me to pass the bravo variable in an API call to the 3rd party to authentic the call.

I would then need a way to store the variables value to a DB (airtable) for future sessions, as I'm assuming the bravo variables have a session duration and wouldn't have a value on repeat visits.

Divyansh August 20, 2022

I can't seem to give you any solution for this one. I tried but not getting anything.

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord