Asked by Jai on February 16, 2025
How can I create a single URL where a query parameter is passed along with an auth token, such as api.example.com/check/{query_parameter}/{auth_token}?
Answered by Twidget
Query parameters are passed after a "?" in the URL. For example: api.example.com/check/{auth_token}?query={query_parameter}. Note that it’s more secure to send auth tokens in an Authorization header rather than embedding them in the URL. See the tutorial: https://www.youtube.com/watch?v=iHULlNQ5KQo&ab_channel=Twidget and the auth tutorial: https://www.youtube.com/watch?v=kfbS6gJqRa4
Setting up a custom domain
Open the API (or page) settings, scroll to the Custom Domain input and follow the on‑screen instructions to configure your CNAME and DNS settings.
Number fields returning null in path parameters
Path, query, and header inputs default to text. Convert the input to a number using the "Convert to Number" command before using it to query the database.
Working with Trafft API lacking availability endpoints
If the external platform (Trafft) does not expose availability via an API endpoint, Twidget cannot retrieve that data. Twidget relies on the external API to access such information. If Trafft adds the appropriate endpoints in the future, Twidget can integrate with them.
If you want help des...
Connecting to Supabase
Connect to Supabase via its REST API: create HTTP Request commands in Twidget that call Supabase’s API endpoints. Reference: https://supabase.com/docs/guides/api and see this example video: https://www.youtube.com/watch?v=IrY_7xnA10g
HTTP request error: "target must be an object"
That error usually occurs when the parameters field is not provided as an object. Ensure the Parameters input of the HTTP Request command is an object type (not a string or other type).