GET unique url from a database cell - How to?
Hi, I am using Xano as a backend to Draftbit. I have a unique url in a cell on a database. How can I GET that user's unique url clickable in their profile section on Draftbit?
…
I was told from support at Draftbit,
"Yes, based on your structure in Xano, you should be able to retrieve warranty url together with user data. If you can pass it to a global variable during sign in process, you can use it in open browser action."
Or, Do I start another API endpoint? I'm struggling to do this actually :-(
Thanks.
Best Answer
-
Hi @RMarineCrawley,
The endpoint that will do the job you need is the
/user/{user_id}
, but you should need to edit something.
More specifically, all you need is to have the user's id saved in the local storage of your application.
You could also set an automatic refreshment of the user's auth token and retrieve the user's id from the /auth/me endpoint. But if you are on a starting point, you shouldn't trouble yourself with that.
After that by calling the/user/{user_id}
endpoint you should get as a response a JSON with all the user information. Refer to a specific field of the JSON using the dot.
If your JSON is named user_1, then to get the link you needuser_1.warranty
Answers
-
I'd like to thank you for your help and support @Lefteris - Buynocodeapps
I combined your comments with support from Draftbit and got it sorted. I'm sure I'll be asking for more help soon!
Thanks again.
Matthew 😀
-
Glad I helped @RMarineCrawley!
If you need anything else I'll be here for you my friend.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback