• Resolved coderswift

    (@coderswift)


    Hi dear plugin author,

    I want to create user with rest api could you please help me out how can do it.

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support abhiladdha07

    (@abhiladdha07)

    Hi @coderswift,

    Thanks for reaching out.

    Surely, you can create the user in WordPress via REST API using the default wp/v2/users endpoint provided by WordPress itself along with our plugin’s authentication. Below is how you can do it –

    1. You can use the API mentioned here.
    2. Now, for the above API, you need to authenticate and authorize it, so you can use any of our plugin’s secure authentication method to pass the authorization.

    Let us know if this helps or if you have any questions. We’d be happy to assist you.

    Thanks,
    Team miniOrange

    Thread Starter coderswift

    (@coderswift)

    I already use but api provide the response with this error.

    {

    “status”: “error”,

    “error”: “MISSING_AUTHORIZATION_HEADER”,

    “code”: “401”,

    “error_description”: “Authorization header not received. Either authorization header was not sent or it was removed by your server due to security reasons.”

    }

    Thank You

    Plugin Support abhiladdha07

    (@abhiladdha07)

    Hi @coderswift,

    Thanks for getting back to us.

    To resolve this error, can you please provide me with the following details?

    1. Sample API request format you are making?
    2. On which server your WordPress site is hosted – Apache or Nginx?

    Thanks,
    Team miniOrange

    Thread Starter coderswift

    (@coderswift)

    apache may be

    Thread Starter coderswift

    (@coderswift)

    https://staging1.caioterra.com/test.php

    Check the configuration on above url

    Plugin Support abhiladdha07

    (@abhiladdha07)

    Thanks for confirming that your server is Apache.

    Now, can you share the API request format you are making which is resulting into an error message?

    Thanks,
    Team miniOrange

    Thread Starter coderswift

    (@coderswift)

    Here is the Curl Code that hit the Endpoint. I will provide you with more details if it requires to investigation

    curl –location ‘https://staging1.caioterra.com/wp-json/wp/v2/users’ \
    –header ‘Authorization: Basic base64([email protected]:123456asasas)’ \
    –header ‘Content-Type: application/json’ \
    –data-raw ‘{
    “username”:”[email protected]”,
    “password”:123456
    }’

    Plugin Support abhiladdha07

    (@abhiladdha07)

    Thanks for sharing the details.

    We tested it out and seems currently, you have enabled JWT authentication in the plugin, please make sure that you have chosen the Basic Authentication method, then make the same request again.

    Also please make sure to pass the username and password of the user having the administrator role as only the administrator will be able to create the user as per WordPress.

    Thanks,
    Team miniOrange

    Thread Starter coderswift

    (@coderswift)

    It still doesn’t work for me.

    curl –location ‘https://staging1.caioterra.com/wp-json/wp/v2/users’ \
    –header ‘Content-Type: application/json’ \
    –header ‘Authorization: Basic cmVueW1vbjo4NWNHNTF6ZVJUZk9kOFRDUEMkZjhKU0A=’ \
    –data-raw ‘{
    “username”:”[email protected]”,
    “password”:123456
    }’

    Plugin Support abhiladdha07

    (@abhiladdha07)

    It seems you have still not enabled the Basic Authentication from the plugin’s UI. Can you please check again and make sure that you are following this guide to configure the Basic Authentication?

    Thanks,
    Team miniOrange

    Plugin Support abhiladdha07

    (@abhiladdha07)

    Hi @coderswift,

    We have not heard back from you in a while, so assuming that you are able to make things work for you. Hence, we are marking this thread as closed but please feel free to create a new thread if you still have any questions. We’d be happy to assist.

    Thanks,
    Team miniOrange

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Register’ is closed to new replies.