Skip to:
Content
Pages
Categories
Search
Top
Bottom

Signup api end point not working

Viewing 7 replies - 1 through 7 (of 7 total)

  • Renato Alves
    Moderator

    @espellcaste

    @hoopkonsulting As the error suggests, you are not sending a required field as part of the signup payload.

    See the documentation.


    Pratik Londhe
    Participant

    @pratiklondhe

    I am sending the signup API data the way it is defined in the Documentation to add XProfile Fields in it, but only the full_name field is getting saved, all other fields are not getting saved when signup is complete.
    Any idea why this might be happening?


    Renato Alves
    Moderator

    @espellcaste

    Can you share your BP Version, request payload?


    Pratik Londhe
    Participant

    @pratiklondhe

    I have added the request payload ans also the response to the xprofile/fields?signup_fields_only=true endpoint, but it doesn’t seem to be appearing under this post.


    Pratik Londhe
    Participant

    @pratiklondhe

    BP version : 14.0.0

    Request Payload:

    
    user_login: "testthe+request+"
    user_email: "pratik@testmail.com"
    password: '"]);L)Q542q8dL3'
    country: "AZE"
    state: "gggg"
    postal_code: "444444"
    mobile_phone: "555555555"
    user_name: "testthe+request+"
    signup_field_data[0][field_id]: "1"
    signup_field_data[0][value]: "testthe+request+"
    signup_field_data[1][field_id]: "2"
    signup_field_data[1][value]: "AZE"
    signup_field_data[2][field_id]: "24"
    signup_field_data[2][value]: "gggg"
    signup_field_data[3][field_id]: "5"
    signup_field_data[3][value]: "555555555"
    signup_field_data[4][field_id]: "18"
    signup_field_data[4][value]: "444444"
    context: "edit"
    

    Renato Alves
    Moderator

    @espellcaste

    Three things:

    – I can’t replicate the issue you have.
    user_name is not a valid field, btw. It was deprecated.

    Using the followwing payload, I actually get this in BuddyPress 14.0 since you are using + in the user_login, that’s not valid.

    Request Payload.

    
    curl -X POST "https://bp-demo.test/wp-json/buddypress/v1/signup/" \
         -d "context=edit" \
         -d "user_email=pratik@testmail.com" \
         -d "user_login=testthe+request+" \
         -d "password=\"']));L)Q542q8dL3" \
         -d "signup_field_data[0][field_id]=1" \
         -d "signup_field_data[0][value]=testthe+request+" \
         -d "state=gggg" \
         -d "country=AZE" \
         -d "postal_code=444444" \
         -d "mobile_phone=555555555"
    
    
    {
      "code": "bp_rest_signup_validation_failed",
      "data": {
        "status": 500
      },
      "message": "Usernames can contain only letters, numbers, ., -, and @"
    }
    

    Here is the BP configuration I have locally, taken from my local site: https://bp-demo.test/wp-admin/site-health.php?tab=debug

    
    version: 14.0.0
    active_components: Extended Profiles, Settings, Friend Connections, Private Messages, Activity Streams, Notifications, User Groups, Site Directory, Members, Members Invitations
    url_parser: BP Rewrites API
    global_community_visibility: anyone
    template_pack: BuddyPress Nouveau 14.0.0
    ! hide-loggedout-adminbar: Yes
    ! bp-disable-account-deletion: Yes
    ! bp-disable-avatar-uploads: Yes
    ! bp-disable-cover-image-uploads: Yes
    bp-enable-members-invitations: No
    bp-enable-membership-requests: No
    ! bp-disable-profile-sync: Yes
    ! bp_restrict_group_creation: Yes
    ! bp-disable-group-avatar-uploads: Yes
    ! bp-disable-group-cover-image-uploads: Yes
    ! bp-disable-group-activity-deletions: Yes
    ! bp-disable-blogforum-comments: No
    _bp_enable_heartbeat_refresh: Yes
    

    Renato Alves
    Moderator

    @espellcaste

    XProfile Fields in it, but only the full_name field is getting saved, all other fields are not getting saved when signup is complete.

    Now, it is important the signup fields are registered in the proper location.

    Confirm if your signup fields are correctly grouped here: your-site.com/wp-admin/users.php?page=bp-profile-setup In the Signup Fields group.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar