1

I am using authentication.py for oauth2 with tastypie.

Get method is working fine but POST I am getting 401 status code.

The access token is correct with read-write permission.

class ExampleResource(ModelResource):
    class Meta:
        queryset = ExampleModel.objects.all()
        resource_name = 'example'
        detail_allowed_methods = ['post',]
        authorization = DjangoAuthorization()
        authentication = OAuth20Authentication()
        always_return_data = True
        default_format = "application/json"

 API url : http://localdisk:8000/api/v1/example/

I am sending Access token in header of packet.

It is working fine when authorization = Authorization() is used in place of DjangoAuthorization()

Can anyone please give info where it is wrong ? Thanks in advance.

theLeanDeveloper
  • 391
  • 4
  • 14
  • would you consider writing a solution below or here at my similar issue: http://stackoverflow.com/questions/27134080/django-tastypie-post-unauthorized-on-different-servers – jpwagner Nov 26 '14 at 14:55

0 Answers0