[wp-trac] [WordPress Trac] #57510: /wp/v2/users/me returns rest_not_logged_in when using plain permalinks

WordPress Trac noreply at wordpress.org
Fri Jan 20 02:45:17 UTC 2023


#57510: /wp/v2/users/me returns rest_not_logged_in when using plain permalinks
-------------------------------+------------------------------
 Reporter:  clairedev          |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  REST API           |     Version:  6.1.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  rest-api
-------------------------------+------------------------------
Changes (by peterwilsoncc):

 * keywords:   => reporter-feedback
 * component:  HTTP API => REST API


Comment:

 Hi @clairedev and welcome to wordpress.org and trac!

 I'm unable to reproduce this, I'm afraid. While testing locally with plain
 permalinks I receive the expected result via a curl authenticated GET
 request:


 {{{
 $ curl 'http://admin:123456789012345678901234@wp-
 dev.local/?rest_route=/wp/v2/users/me'

 {"id":1,"name":"admin","url":"http:\/\/wp-
 dev.local","description":"","link":"http:\/\/wp-
 dev.local\/?author=1","slug":"admin","avatar_urls":{"24":"http:\/\/2.gravatar.com\/avatar\/e64c7d89f26bd1972efa854d13d7dd61?s=24&d=mm&r=g","48":"http:\/\/2.gravatar.com\/avatar\/e64c7d89f26bd1972efa854d13d7dd61?s=48&d=mm&r=g","96":"http:\/\/2.gravatar.com\/avatar\/e64c7d89f26bd1972efa854d13d7dd61?s=96&d=mm&r=g"},"meta":[],"_links":{"self":[{"href":"http
 :\/\/wp-
 dev.local\/index.php?rest_route=\/wp\/v2\/users\/1"}],"collection":[{"href":"http
 :\/\/wp-dev.local\/index.php?rest_route=\/wp\/v2\/users"}]}}
 }}}

 Are you able to provide further information if you are not using the same
 URL format as I? Please remember to replace the password with a
 placeholder, especially if the URL is from a public site.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57510#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list