0

I’ve a code which is written by third party vendor back in 2014 in Objective-C language. Now, the issue with this is that when I try to login with valid credentials I’m getting below error

API error: Request failed: forbidden (403) in console window.

The strange thing is that if I run the same on postman then it return valid response. The communication with server is done using pod 'AFNetworking', ‘2.4.1’.

Screenshot 1

Is this issue due to older version of AFNetworking being used?

If I update to Pod to latest 3.2.0 version then it fails to build the application with compile time error as ‘Parse Issue’

Screenshot 2

This 'Parse Issue' is resolved by replacing occurrence of AFHTTPRequestOperation with AFHTTPSessionManager. Now the app builds successfully but getting same error for login.

Any fix?

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
  • 1
    this may help https://stackoverflow.com/questions/32785972/afnetworking-2-0-always-return-403 – Rocky Mar 22 '18 at 08:04
  • I agree with @Rocky - I would make sure you are setting the acceptable response types. Also, if you could post the the code that is actually making the request that results in the 403 erro, that might be helpful. – wottle Mar 22 '18 at 13:46

0 Answers0