Help - Send to Memberstack API

I’ve got my Google Analytics sending to Airtable working. Now trying to send them to Memberstack.com as well - because Webflow can pull this live data (custom attributes) onto static pages.

The Memberstack API seems limited and is in Beta. I know this can be done though as this guy achieves it in his video https://youtu.be/3GYq9S3-0FY?t=592. I reached out to the author but sadly he won’t tell me how he did it ?! :frowning:

Problem 1 - exporting
Unlike Airtable - using a bearer token for auth, Memberstack seems to use the x-api-key Request header Authentication - Memberstack API and you make an api key in their dashboard.
Using this Request header method (with no other Authentication) in Parabola gives me an error

{
  "message": "Missing Authentication Token"
}

So what Auth token am I supposed to use if Memberstack’s docs talk about the X-API-KEY request header?

Problem 2
I used a “Pull from API” with Memberstack info to see what kind of data I’m getting and the name of the field I want to pass my GA stats into. Initially the JSON data was a big long string. A JSON flattener didn’t reveal all the data. The fields I need are quite deep. Some experimenting led me to find the fields I want to target are called members.customField.ig-clicks and members.customField.tw-clicks etc.

So is this the right syntax in the request body? (The key being the GA data)

{
	"fields": {
		"IG clicks": "{members.customFields.ig-clicks}"
	},
	"typecast": true
}

Yes I tried reaching out to Memberstack too and have had no help :frowning:

Hope someone can help. This is damn hard for a designer… but very exciting to be learning :smiley:
Cheers
~Capt :anchor:

Hey Capt! :anchor:

Thanks for reaching out!

Problem 1
You can generate an API Key by heading to your Memberstack dashboard. You’ll have to send the API Key as a custom header value. Can you make sure your header key is X-API-KEY? You can manually type in a custom header:

Problem 2
To update a member you’ll need to make a POST request to this endpoint:

https://api.memberstack.com/v1/members/:id

Swap out the :id in the URL with the column name containing the Ids of your members. Assuming the field in Memberstack is called ig-clicks, your request body might look like this:

{ 
    "ig-clicks": "{members.customFields.ig-clicks}",
  }

That will update each member’s field using the values in their members.customFields.ig-clicks column.

Let me know if this helps!

Hey Daniel
Thanks so much for your help again.
I did have the X-API-key info in place yes.

I was sending a PATCH request so that was possibly the issue. POST is working, although I’m now getting an error over my field name but I think I can sort that out.

Thanks again!

Hey @daniel

This still isn’t working for me. I get this error

{
  "error": "IG clicks  is not a valid field."
}

but IG clicks is what the column is called in Airtable!

This has cost me 11 credits to try and get this working today! It’s still so unfair to get charged for errors when you’re learning how to use the tool.

Hope you can help me
Cheers

Hey @Yes_Captain,

Are you sending this data to Airtable or Memberstack? What is that field called in Memberstack? It’s also helpful to check that the column value you are referencing exists in the previous step.

Thx @daniel

Yes I’m sending Airtable data to Memberstack via the X-API-KEY method you outlined.

Memberstack - the field label is called “IG clicks” but seemed to be reachable via members.customFields.ig-clicks (Memberstack writes the label as “ig-clicks” in it’s data-ms-member attributes value)

In Airtable - the column is “IG clicks”

So I need to import the Memberstack data first in order to write out to it? I can’t just push Airtable data out to Memberstack’s API?

Appreciate your ongoing help.

Thank you for clarifying. Based on that error message, Memberstack is telling you that the field name IG clicks is not valid.

You’ll want to reference the field name that Memberstack refers to it as. Try this as a JSON request:

{
    "ig-clicks": {IG clicks}
  }

The value ig-clicks hopefully refers to the correct field in Memberstack. The value {IG clicks} should insert the numeric value from your Airtable column into your Memberstack field.

for anyone else with this issue
the legend @daniel helped me fix it!

{
    "customFields": {
        "ig-clicks": {IG clicks}
  }
}

my API endpoint

https://api.memberstack.com/v1/members/{Memberstack ID}
1 Like