If you have a third-party app that needs to create users inside your MemberPress website your only option is to use the Developer Tools add-on to create users via the API.
But there is a limitation to that.
You can set only the basic fields for that user via the API.
If you have any custom fields they won’t be filled via the MemberPress API.
To solve this problem we’ve created an add-on that allows you to update the user that you created through the MemberPress API to fill the custom fields too.
We call our plugin, MemberPress User Profile API Endpoint.
Now you get to use it too. 🙂
How do I use MemberPress User Profile API Endpoint
Follow these steps to install and use our plugin.
Install MemberPress User Profile API Endpoint
1.1 – On the ‘Plugins’ page press on ‘Upload Plugin’
1.2 – Upload the ZIP file that you received after the purchase in the form that showed up
1.3 – In the ‘Plugins’ list activate the plugin
Create a member through the MemberPress Developer Tools API
At this step, you need to follow MemberPress’s documentation about the Developer Tools API and use it to create a new member in the system.
Send a second request to our endpoint
The endpoint accepts only POST requests
The required format is JSON.
At this moment you have the user created so you’ll need to send a POST request with the data you need to add to their profile information.
To do so you’ll need to use the following route:
This will make the address you are sending to like this example:
To authenticate your request you will need to pass the same header bearer as you did for MemberPress.
The header name and API key are the same as the ones from the MemberPress Developer Tools.
1 – user_id – The ID of the user you are going to update
2 – Any other custom field you have created in MemberPress and marked it as Required.
The endpoint accepts parameters that respect the MemberPress custom fields slugs. The slugs can be found in the ‘Fields’ table.
“user_id” : “2”,
“mepr_sorin” : “Here comes the data for the field”,
“mepr_sorin2” : “And here you can add other data”
[Download] MemberPress User Profile API Endpoint Plugin
After checkout, please follow the instructions in this post.
When you are done with that the plugin should work by itself.
Will you provide support for this plugin?
Of course! 🙂
We’ll be providing support for the MemberPress User Profile API Endpoint only.
So if you have any questions or issues please come back to this post and leave a comment describing them (you can also upload screenshots in the comments).
We will provide email support at [email protected] but using comments instead, everybody benefits from the conversation and explanations, including existing and potential customers. 🙂
It also fosters transparency which improves the direction of development by involving our entire community.