Page 1 of 1

Updating Users, keep getting unauthorized

Posted: Sat May 16, 2015 7:00 pm
by Richard Edwards

Hi there,

I'm having difficulty updating users in my db. I think I've set up the service correctly but I keep getting the following - even when I test it within Appery:

{
"status":401,
"uri":"https://api.appery.io/rest/1/db/users...",
"response":{
"code":"DBUU001",
"description":"unauthorized"
}
}

What am I missing? Is it because I don't have X-Appery-Session-Token set in the Headers? And if so, what should I use there?

Here are my settings:

Image Image
Image Image

Thanks for your help!


Updating Users, keep getting unauthorized

Posted: Sat May 16, 2015 7:41 pm
by maxkatz

Correct, you need to pass the session token (in header) which you get when you login.


Updating Users, keep getting unauthorized

Posted: Sat May 16, 2015 8:07 pm
by Richard Edwards

Hi Max,

Thanks for the quick reply! Okay, so I have got that and also now realise that users can only update their own object too. It works!

Thanks for being so speedy and awesome!
Richard


Updating Users, keep getting unauthorized

Posted: Thu Oct 17, 2019 2:56 am
by Michael Ochakovsky

How was this solved? I've been trying to update some fields on my tables for over a year. still cannot find any code to do this.

Any help practical pointers would be appreciated


Updating Users, keep getting unauthorized

Posted: Thu Oct 17, 2019 2:59 am
by Michael Ochakovsky

How do I display all the DB record for the current user on the gui, via a separate label for each db field. Who can answer this without sending me a link? Does anyone on the forum knows how to do this?

Thanks


Updating Users, keep getting unauthorized

Posted: Fri Oct 18, 2019 7:16 am
by Serhii Kulibaba

Hello Michael,

Have you imported a database update service into your project?

Could you please clarify what you have tried and what exactly does not work?


Updating Users, keep getting unauthorized

Posted: Fri Oct 25, 2019 1:25 am
by Michael Ochakovsky

Not much Serhii. my knowledge of js is very limited at this time.

I have an app with the default 'Users' collection, where I store each username, password, and a pointer column pointing to: 'to_userdata'

Here is my goal:

  1. When a user login to the app I want to retrieve and store the login user's pointer id.and store this value into a LSV.

  2. I'd then use this pointer id in my code to perform different collection/database operations (read, update, delete...)

    is this something you have experience on? I looked all over your API docs and there is no sample code explaining how this is done., There are many random fragmentd mention of such procedures, but nothing concrete I can use or use as reference for my code. Can you help? or perhaps someone in your team can share some code with me.

    any starter sample code would be a great help for me.

    Thanks Serhii

    Mike


Updating Users, keep getting unauthorized

Posted: Fri Oct 25, 2019 2:38 pm
by Serhii Kulibaba

Hello Michael,

Let's continue the discussion in the ticket #38430