{"id":1461,"date":"2016-03-13T13:43:12","date_gmt":"2016-03-13T20:43:12","guid":{"rendered":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/?p=1461"},"modified":"2016-03-13T13:43:12","modified_gmt":"2016-03-13T20:43:12","slug":"api-deactivate-a-member-profile-using-http-get-or-post","status":"publish","type":"post","link":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461","title":{"rendered":"API \u2013 Deactivate A Member Profile 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>If you want to deactivate\u00a0a member&#8217;s account profile using a HTTP GET or POST request then use this documentation.<!--more--><\/p>\n<h2>Enabling the API<\/h2>\n<p><a href=\"https:\/\/www.tipsandtricks-hq.com\/wordpress-emember-easy-to-use-wordpress-membership-plugin-1706\">WP eMember plugin<\/a> has an API that allows you to deactivate\u00a0a member&#8217;s profile using a standard HTTP GET or POST request. If you want to use this API then you need to enable it from the settings menu of the plugin first. 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\" \/><\/p>\n<h2>Using the\u00a0API<\/h2>\n<p>Once you enable the API, you can start to send HTTP request to the following URL to deactivate\u00a0a\u00a0member&#8217;s profile remotely or from another software\/application:<\/p>\n<pre>http:\/\/www.example.com\/wp-content\/plugins\/wp-eMember\/api\/deactivate.php\r\n<\/pre>\n<p>You need to provide 2 pieces of information with the API 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>Member ID or the email address of the member.<\/li>\n<\/ul>\n<p>You can optionally pass the account status that you want to set for the member (by default it will be set to inactive if you don&#8217;t pass any value).<\/p>\n<h2>1. Deactivate\u00a0Member Account Using \u00a0HTTP GET request<\/h2>\n<p>In order to deactivate\u00a0a member account via HTTP GET request, use the following format:<\/p>\n<pre>http:\/\/www.example.com\/wp-content\/plugins\/wp-eMember\/api\/deactivate.php?secret_key=XX&amp;member_id=XX<\/pre>\n<p>OR the following (if you want to deactivate\u00a0using the\u00a0email address of the member):<\/p>\n<pre>http:\/\/www.example.com\/wp-content\/plugins\/wp-eMember\/api\/deactivate.php?secret_key=XX&amp;email=XX<\/pre>\n<p>Replace the &#8216;example.com&#8217; and &#8216;XX&#8217; with the appropriate values.<\/p>\n<h2>1. Deactivate\u00a0Member Account Using \u00a0HTTP POST\u00a0request<\/h2>\n<p>To deactivate\u00a0a 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\/deactivate.php\"&gt;\r\n&lt;input type=\"hidden\" name=\"secret_key\" value=\"XX\"&gt;\r\n&lt;input type=\"hidden\" name=\"member_id\" value=\"XX\"&gt;\r\n&lt;input type=submit value=\"Submit Post\"&gt;\r\n&lt;\/form&gt;<\/pre>\n<p>Replace the &#8216;example.com&#8217; and &#8216;XX&#8217; with the appropriate value.<\/p>\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. If you want to deactivate\u00a0a member&#8217;s account profile using a HTTP GET or POST request then use this documentation.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","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],"tags":[43,42,76,90,5],"class_list":{"0":"post-1461","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-additional-resources","7":"tag-3rd-party-integration","8":"tag-api","9":"tag-emember-extension","10":"tag-integration","11":"tag-wp-emember","12":"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 Deactivate A Member Profile 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-deactivate-a-member-profile-using-http-get-or-post-1461\" \/>\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-deactivate-a-member-profile-using-http-get-or-post-1461#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#\/schema\/person\/d68b2ffa792aeb141f10f910dacccfdd\"},\"headline\":\"API \u2013 Deactivate A Member Profile Using HTTP GET or POST\",\"datePublished\":\"2016-03-13T20:43:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461\"},\"wordCount\":284,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg\",\"keywords\":[\"3rd party integration\",\"API\",\"emember extension\",\"Integration\",\"WP eMember\"],\"articleSection\":[\"Additional Resources\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461\",\"url\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461\",\"name\":\"API \u2013 Deactivate A Member Profile 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-deactivate-a-member-profile-using-http-get-or-post-1461#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg\",\"datePublished\":\"2016-03-13T20:43:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#\/schema\/person\/d68b2ffa792aeb141f10f910dacccfdd\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461#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-deactivate-a-member-profile-using-http-get-or-post-1461#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API \u2013 Deactivate A Member Profile 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 Deactivate A Member Profile 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-deactivate-a-member-profile-using-http-get-or-post-1461","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-deactivate-a-member-profile-using-http-get-or-post-1461#article","isPartOf":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461"},"author":{"name":"admin","@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#\/schema\/person\/d68b2ffa792aeb141f10f910dacccfdd"},"headline":"API \u2013 Deactivate A Member Profile Using HTTP GET or POST","datePublished":"2016-03-13T20:43:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461"},"wordCount":284,"commentCount":0,"image":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461#primaryimage"},"thumbnailUrl":"http:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg","keywords":["3rd party integration","API","emember extension","Integration","WP eMember"],"articleSection":["Additional Resources"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461","url":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461","name":"API \u2013 Deactivate A Member Profile 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-deactivate-a-member-profile-using-http-get-or-post-1461#primaryimage"},"image":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461#primaryimage"},"thumbnailUrl":"http:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-content\/uploads\/2011\/12\/emember-3rd-party-integration.jpg","datePublished":"2016-03-13T20:43:12+00:00","author":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/#\/schema\/person\/d68b2ffa792aeb141f10f910dacccfdd"},"breadcrumb":{"@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/api-deactivate-a-member-profile-using-http-get-or-post-1461#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-deactivate-a-member-profile-using-http-get-or-post-1461#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/"},{"@type":"ListItem","position":2,"name":"API \u2013 Deactivate A Member Profile 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\/1461","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=1461"}],"version-history":[{"count":0,"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/posts\/1461\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/media?parent=1461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/categories?post=1461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/wordpress-membership\/wp-json\/wp\/v2\/tags?post=1461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}