{"id":447,"date":"2011-12-06T23:00:45","date_gmt":"2011-12-07T06:00:45","guid":{"rendered":"http:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/?p=447"},"modified":"2024-09-11T21:18:09","modified_gmt":"2024-09-12T04:18:09","slug":"api-creating-a-member-account-using-http-get-or-post","status":"publish","type":"post","link":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447","title":{"rendered":"API \u2013 Creating A Member Account Using HTTP GET or POST"},"content":{"rendered":"<p><span style=\"color: #ff0000;\"><em><strong>This documentation is only for developers. If you are not a developer with good PHP coding skills then you have no need to read this.<\/strong><\/em><\/span><\/p>\n<p>WP eMember plugin has an API that allows you to create a member account using a standard HTTP GET or POST request.<\/p>\n<h2>Enabling the API<\/h2>\n<p>If you want to use this API then you need to enable it from the settings menu of the plugin first.<\/p>\n<p>Go to the settings menu then scroll down to the &#8220;Additional Integration Options&#8221; section to find the option.<\/p>\n<p>The following is a screenshot of this section in the settings menu:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-448\" title=\"emember-3rd-party-integration\" src=\"http:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg\" alt=\"\" width=\"558\" height=\"159\" srcset=\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg 698w, https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration-300x85.jpg 300w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><br \/>\nIt is very important that you do not reveal the Secret Word\/API key to anyone else.<\/p>\n<h2>Using the\u00a0API<\/h2>\n<p>Once you enable it, you can start to send HTTP request to the following URL to create member account remotely or from another software:<\/p>\n<pre>http:\/\/www.example.com\/wp-content\/plugins\/wp-eMember\/api\/create.php\n<\/pre>\n<p>You need a minimum of 5 pieces of information to create a member account using a HTTP request. These are:<\/p>\n<ul>\n<li>Secret Word\/API Key (you specified it in the settings menu of the plugin)<\/li>\n<li>First Name<\/li>\n<li>Last Name<\/li>\n<li>Email Address<\/li>\n<li>Membership Level ID<\/li>\n<\/ul>\n<p>Optionally, you can pass in the following data with the request (if you do not pass these, a randomly generated value will be used for these)<\/p>\n<ul>\n<li>username<\/li>\n<li>password<\/li>\n<\/ul>\n<h2>1. Creating Member Account Using \u00a0HTTP GET request<\/h2>\n<p>In order to create a member account via HTTP GET use the following format:<\/p>\n<pre>http:\/\/www.example.com\/wp-content\/plugins\/wp-eMember\/api\/create.php?secret_key=XX&amp;first_name=XX&amp;last_name=XX&amp;email=XX&amp;membership_level_id=XX<\/pre>\n<p>Replace the &#8216;example.com&#8217; and &#8216;XX&#8217; with the appropriate values.<\/p>\n<p><strong>PHP Code Example:<\/strong>The following is an example of how to construct this link using PHP:<\/p>\n<pre>$secret_key = \"6bd39ewe43a7bb\";\n$first_name= \"Jon\";\n$last_name= \"Doe\";\n$email= \"jon.doe@gmail.com\";\n$membership_level_id= \"1\";\n$prepared_data = \"?secret_key=\".$secret_key.\"&amp;first_name=\".$first_name.\"&amp;last_name=\". $last_name.\"&amp;email=\".$email.\"&amp;membership_level_id=\".$membership_level_id;\n$get_url = \"http:\/\/www.example.com\/wp-content\/plugins\/wp-eMember\/api\/create.php\".$prepared_data;\n\/\/ Execute this GET Request\nfile_get_contents($get_url);<\/pre>\n<h2>2. Creating Member Account Using \u00a0HTTP POST request<\/h2>\n<p>To create a member account via HTTP POST use the following format:<\/p>\n<pre>&lt;form method=\"post\" action=\"http:\/\/www.example.com\/wp-content\/plugins\/wp-eMmeber\/api\/create.php\"&gt;\n&lt;input type=\"hidden\" name=\"secret_key\" value=\"XX\"&gt;\n&lt;input type=\"hidden\" name=\"first_name\" value=\"XX\"&gt;\n&lt;input type=\"hidden\" name=\"last_name\" value=\"XX\"&gt;\n&lt;input type=\"hidden\" name=\"email\" value=\"XX\"&gt;\n&lt;input type=\"hidden\" name=\"membership_level_id\" value=\"XX\"&gt;\n&lt;input type=submit value=\"Submit Post\"&gt;\n&lt;\/form&gt;<\/pre>\n<p>Replace the &#8216;example.com&#8217; and &#8216;XX&#8217; with the appropriate value.<\/p>\n<p><a name=\"additional_fields\"><\/a><\/p>\n<h2>Passing Additional Field Values<\/h2>\n<p>You can optionally pass additional field values using the following parameters in your request:<\/p>\n<ul>\n<li>phone<\/li>\n<li>address_street<\/li>\n<li>address_city<\/li>\n<li>address_state<\/li>\n<li>address_zipcode<\/li>\n<li>country<\/li>\n<li>gender<\/li>\n<li>company_name<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This documentation is only for developers. If you are not a developer with good PHP coding skills then you have no need to read this. WP eMember plugin has an API that allows you to create a member account using a standard HTTP GET or POST request. Enabling the API If you want to use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[14,13],"tags":[43,42,90],"class_list":{"0":"post-447","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-additional-resources","7":"category-integration","8":"tag-3rd-party-integration","9":"tag-api","10":"tag-integration","11":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>API \u2013 Creating A Member Account Using HTTP GET or POST - WordPress Membership<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#\/schema\/person\/d68b2ffa792aeb141f10f910dacccfdd\"},\"headline\":\"API \u2013 Creating A Member Account Using HTTP GET or POST\",\"datePublished\":\"2011-12-07T06:00:45+00:00\",\"dateModified\":\"2024-09-12T04:18:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447\"},\"wordCount\":332,\"commentCount\":10,\"image\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg\",\"keywords\":[\"3rd party integration\",\"API\",\"Integration\"],\"articleSection\":[\"Additional Resources\",\"Integration\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447\",\"url\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447\",\"name\":\"API \u2013 Creating A Member Account Using HTTP GET or POST - WordPress Membership\",\"isPartOf\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg\",\"datePublished\":\"2011-12-07T06:00:45+00:00\",\"dateModified\":\"2024-09-12T04:18:09+00:00\",\"author\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#\/schema\/person\/d68b2ffa792aeb141f10f910dacccfdd\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#primaryimage\",\"url\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg\",\"contentUrl\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg\",\"width\":\"698\",\"height\":\"199\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API \u2013 Creating A Member Account Using HTTP GET or POST\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#website\",\"url\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/\",\"name\":\"WordPress Membership\",\"description\":\"Easy to use WordPress Membership plugin\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#\/schema\/person\/d68b2ffa792aeb141f10f910dacccfdd\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/3a21ab4072e533cf470d80fc2f0fd3639872824ade4e23709397e109b24f8857?s=96&d=identicon&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3a21ab4072e533cf470d80fc2f0fd3639872824ade4e23709397e109b24f8857?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3a21ab4072e533cf470d80fc2f0fd3639872824ade4e23709397e109b24f8857?s=96&d=identicon&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"API \u2013 Creating A Member Account Using HTTP GET or POST - WordPress Membership","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#article","isPartOf":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447"},"author":{"name":"admin","@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#\/schema\/person\/d68b2ffa792aeb141f10f910dacccfdd"},"headline":"API \u2013 Creating A Member Account Using HTTP GET or POST","datePublished":"2011-12-07T06:00:45+00:00","dateModified":"2024-09-12T04:18:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447"},"wordCount":332,"commentCount":10,"image":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#primaryimage"},"thumbnailUrl":"http:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg","keywords":["3rd party integration","API","Integration"],"articleSection":["Additional Resources","Integration"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447","url":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447","name":"API \u2013 Creating A Member Account Using HTTP GET or POST - WordPress Membership","isPartOf":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#primaryimage"},"image":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#primaryimage"},"thumbnailUrl":"http:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg","datePublished":"2011-12-07T06:00:45+00:00","dateModified":"2024-09-12T04:18:09+00:00","author":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#\/schema\/person\/d68b2ffa792aeb141f10f910dacccfdd"},"breadcrumb":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#primaryimage","url":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg","contentUrl":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg","width":"698","height":"199"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-creating-a-member-account-using-http-get-or-post-447#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/"},{"@type":"ListItem","position":2,"name":"API \u2013 Creating A Member Account Using HTTP GET or POST"}]},{"@type":"WebSite","@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#website","url":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/","name":"WordPress Membership","description":"Easy to use WordPress Membership plugin","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#\/schema\/person\/d68b2ffa792aeb141f10f910dacccfdd","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3a21ab4072e533cf470d80fc2f0fd3639872824ade4e23709397e109b24f8857?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3a21ab4072e533cf470d80fc2f0fd3639872824ade4e23709397e109b24f8857?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3a21ab4072e533cf470d80fc2f0fd3639872824ade4e23709397e109b24f8857?s=96&d=identicon&r=g","caption":"admin"},"url":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/posts\/447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/comments?post=447"}],"version-history":[{"count":0,"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/posts\/447\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/media?parent=447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/categories?post=447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/tags?post=447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}