WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a a mobile angularjs app that's using https://github.com/Tmeister/wp-api-jwt-auth jwt auth to add to WP_Rest API www.wp-api.org which works fine, when a user is an Administrator. However, when an editor tries to login I get the error;

code
:
"rest_user_cannot_view"
data
:
{status: 401}
message
:
"Sorry, you cannot view this resource."

I can't work out how to change the user levels anywhere:

   createAccessToken:function(user){
                    var token = '';
                    $http.post( serviceBase + 'wp-json/jwt-auth/v1/token', {
                        username: user.username,
                        password: user.password
                    } )
                    .then( function( response ) {
                        console.log(response.data);   
                        token = response.data.token;
                        Token.set(token);
                    } )
                    .catch( function( error ) {
                        console.error( 'Error', error.data[0] );
                    } );

                    return token;
                },
share|improve this question
    
Have you opened an issue with the author/support? – Tom J Nowell 1 hour ago
    
It's not active on github, no ones questions have been answered really, i wondered if it was just something stupid I was missing – Tom 1 hour ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.