Duplicate Site Membership to External API

@givemeawhisky Thank you so much for the links. I am literally stuck on this portion of the site and will, hopefully, be complete once this feature is all set! I do have one question though, I am getting an error message that reads:

status:
“failure”

message:
“no public key”

I will post my page and backend code below.