• I need to use PaidMembershipsPro API to programmatically change a membership of a user.

    For my Admin user I created Application Password, then I created base64 from auth data:
    const token = Buffer.from(${process.env.WP_USERNAME}:${process.env.WP_APP_PASSWORD}).toString( 'base64');

    Set Basic Authorization:
    axios.defaults.headers.common['Authorization'] = Basic ${token};

    But any /pmpro/v1 route, I’m trying to trigger always returns me the error:

    data: {
       status: 'error',
       error: 'Restricted',
       error_description: 'Sorry, you are not allowed to access REST API.'
    }

    My user has all pmpro capabilities.

    • This topic was modified 1 year, 12 months ago by t-p. Reason: Moved to Fixing WordPress from Developing with WordPress
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘PaidMembershipsPro REST 403 error’ is closed to new replies.