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

1 of 419 articles shown, currently no other people reading this forum.
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.

Related articles

API User !!! HELP (all 5) RSS
├─ original   Sun 24th May 2020, 9:17pm, ANONYMOUS
├─ reply 1   Mon 25th May 2020, 9:52am, Timothy F.
├─ reply 2   Mon 25th May 2020, 1:41pm, ANONYMOUS  O.P.
├─ THIS   Mon 25th May 2020, 4:59pm, Timothy F.
└─ reply 4   Mon 25th May 2020, 5:34pm, ANONYMOUS  O.P.
This Page


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