GET unique url from a database cell - How to?

Options

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.

Tagged:

Best Answer

  • Lefteris - blupry.com
    Lefteris - blupry.com Member ✭✭
    Answer ✓
    Options

    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 need user_1.warranty

Answers