Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact
You are here: Home

Mani45

  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • June 27, 2025 at 7:51 pm in reply to: Error when creating a member with the API #30702
    Mani45
    Participant

    I managed to make it work with Postman by putting swpm_api_action and key in “Params” and first_name, last_name and email in “Body” and by choosing form-data. It gives a 200 OK status and the member is created in WP.

    But now I’m trying to do the same thing with a code written with apps script:

    function make_POST() {
    var url = ‘https://mycanonicalurl/?swpm_api_action=create&key=5e4aa7acd2858b45xxxxxxxxxxxxxxxxx’;

    var body = {
    first_name: ‘Bruce’,
    last_name: ‘Wayne’,
    email: ‘bwayne@example.com’
    };

    var options = {
    method: ‘POST’,
    payload: JSON.stringify(body),
    muteHttpExceptions: true
    };

    //try {
    var response = UrlFetchApp.fetch(url, options);
    var responseCode = response.getResponseCode();
    Logger.log(‘response code: ‘ + responseCode);
    /*

    }

    I got an error code 307 and it doesn’t create the member.

    Someone can help to figure out the problem please?

  • Author
    Posts
Viewing 1 post (of 1 total)
Next Page »

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy