DEV Community

Discussion on: Flask Rest API -Part:3- Authentication and Authorization

Collapse
 
nandamtejas profile image
nandamtejas

I used the route 127.0.0.1:5000/api/movies in POST request and I am getting error like

raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type ObjectId is not JSON serializable

Collapse
 
chakib_elfil_741f922b722c profile image
chakib elfil

me too!

Collapse
 
jmobley09 profile image
Joshua Mobley

I was able to figure this out. Turns out that flask_jwt_extended released a newer version and the annotation is like this now "@jwt_required()". It needs the parenthesis to do a function call.