cancel
Showing results for 
Search instead for 
Did you mean: 

REST API quit working after upgrade

REST API quit working after upgrade

I just upgraded from 2.1 CE to 2.1.7 CE, and right before the upgrade the REST API was working. After, it returns the error 'Consumer is not authorized to access %resources'... 

 

This is when I go to www.mysite.com/rest/V1/customers/me and my user is logged in. I have tried clearing cookies and logging out and back in, it just won't work. 

 

Did the API change or...?

 

In admin the cookie path is '/' 

1 REPLY 1

Re: REST API quit working after upgrade

Any ideas?

 

When I run this from the command line it works:

 


curl 'http://mydomain.com/shop/rest/default/V1/customers/me' \
-H 'Cookie: PHPSESSID=pu43ktdb8sruen2girkkkajr03;' \
-H 'Content-Type: application/json' \
-H 'X-Requested-With: XMLHttpRequest'

 

I got the current session ID from chrome dev tools. 

 

In admin my Cookie Settings under stores/configuration/genera/web are:

 

Cookie Lifetime:  86400

Cookie path:   /

Cookie Domain:   (empty)

Use HTTP Only:   YES

Cookie Restriction Mode:   No

 

Do I need to change any of the session validation settings?