Built-in variables
Learn about the built-in variables you can use in your requests
Last updated
Learn about the built-in variables you can use in your requests
Last updated
Built-in variables are special variables whose value is automatically filled in by Bravo, in contrast to other user-defined variables.
To see the list of built-in variables, type "$" on the API collections text inputs:
Name | Description | Use cases | Tutorial/example |
${device.id} | A unique identifier that identifies the device of the user. (It changes if the user removes and installs the app, and is unique x app, following Privacy Guidelines from Apple). | Used to differentiate the data to allow customization per device i.e. a to-do list specific to the device can be done by using the | |
${device.lang} | Returns the language of the device, "es" for example | Used to help specify the language used i.e. you could filter a list of holiday destinations using the | |
${device.platform} | Returns "ios" or "android" | Return the platform device or the user. Could be used in a web-view to display a different URL to each platform. i.e. QR code to download a mobile app in iOS or Android. | |
${device.latitude} | Returns the user coordinates (latitude value) | Obtain the app user location and send it via API request. The user must have accepted location sharing first. | |
${device.longitude} | Returns the user coordinates (longitude value) | Obtain the app user location and send it via API request. The user must have accepted location sharing first. | |
${user.id} | Returns the user id from the normalized Bravo token if it's available | Once a user is logged in this can be used to customize the data, i.e. a todo list specific to the user by filtering the data specific for the user | |
${user.email} | Returns the user email from the normalized Bravo token if it's available | This will enable similar use cases to | |
${user.access_token} | Returns the user access token from the authentication provider. | Once the user has logged in with the authentication provider, a unique access token will be generated. This token can be used to authenticate the requests sent from Bravo, targeting a custom backend. This token is more robust and secure than the ${user.id}. |