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


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

API User !!! HELP

1 of 419 articles shown, currently no other people reading this forum.
From: Timothy F.
Date: Mon 25th May, 4:59pm



> "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, 9:17pm, ANONYMOUS
├─ reply 1   Mon 25th May, 9:52am, Timothy F.
├─ reply 2   Mon 25th May, 1:41pm, ANONYMOUS  O.P.
├─ THIS   Mon 25th May, 4:59pm, Timothy F.
└─ reply 4   Mon 25th May, 5:34pm, ANONYMOUS  O.P.
This Page

Program written by: [email protected]
Feedback welcome
Last modified:  3:57pm Aug 06 2020