Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3403


This forum is provided to promote discussion amongst students enrolled in Agile Web Development (CITS3403).
 
Options:
RSS cloud
Jump to:

API User !!! HELP

5 of 419 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Sun 24th May 2020, 9:17pm
Actions: 
        Login-to-reply

 

When I typed "localhost:5000/api/users/1" but I got the error {
  "error": "Unauthorized"
}

How could I solve this problem?

API User !!! HELP

photo
From: Timothy F.
Date: Mon 25th May 2020, 9:52am
Actions: 
        Login-to-reply

 

ANONYMOUS wrote:

> When I typed "localhost:5000/api/users/1" but I got the error {
>   "error": "Unauthorized"
> }
> 
> How could I solve this problem?

Have you used the decorators for Token Authentication, and have you implemented the 
necessary functionality, and set up a login route for the basic authentication?

API User !!! HELP

photo
From: ANONYMOUS  O.P.
Date: Mon 25th May 2020, 1:41pm
Actions: 
        Login-to-reply

 

"Timothy French" <ti*.*r*n*[email protected]*a*e*u*a*> wrote:

> ANONYMOUS wrote:
> 
> > When I typed "localhost:5000/api/users/1" but I got the error {
> >   "error": "Unauthorized"
> > }
> > 
> > How could I solve this problem?
> 
> Have you used the decorators for Token Authentication, and have you implemented the 
> necessary functionality, and set up a login route for the basic authentication?

So, at first I need to get the token with the correct username and password and then use 
that token to access localhost:5000/api/users/<id> (id : number) right? 

API User !!! HELP

photo
From: Timothy F.
Date: Mon 25th May 2020, 4:59pm
Actions: 
        Login-to-reply

 

ANONYMOUS wrote:

> "Timothy French" <ti*.*r*n*[email protected]*a*e*u*a*> wrote:
> 
> > ANONYMOUS wrote:
> > 
> > > When I typed "localhost:5000/api/users/1" but I got the error {
> > >   "error": "Unauthorized"
> > > }
> > > 
> > > How could I solve this problem?
> > 
> > Have you used the decorators for Token Authentication, and have you implemented the 
> > necessary functionality, and set up a login route for the basic authentication?
> 
> So, at first I need to get the token with the correct username and password and then use 
> that token to access localhost:5000/api/users/<id> (id : number) right? 

That's the pattern that was used in lectures.

For debugging, you could just remove the decorators to see if the route works.

API User !!! HELP

photo
From: ANONYMOUS  O.P.
Date: Mon 25th May 2020, 5:34pm
Actions: 
        Login-to-reply

 

Thanks Tim 
This Page


Program written by: [email protected]
Feedback welcome
Last modified: 11:27am Sep 21 2020