如何在邮件黑猩猩中使用Api邀请用户

时间:2017-06-08 09:25:28

标签: ruby-on-rails-5 mailchimp mailchimp-api-v3.0

 I am integrating mail chimp API in my rails project 
 I am using OAUTH2 API Documentation and following the below ref.
  

http://developer.mailchimp.com/documentation/mailchimp/guides/how-to-use-oauth2/

 It integrate successfully and return an access token.

 My Project has a requirement that Admin can invite user 
 and give the permission of each user using Api same like below image. 

IMAGE

 Is there Any endpoint available in a API that accept the parameters 
 like access token,user_email and user_type and add/update the visitor same like web ?

1 个答案:

答案 0 :(得分:0)

在MailChimp 2.0中。它已被删除3.0(我不知道为什么)。当我邀请用户时,我正在尝试与网站进行相同的调用,但API中有一个集成的Chapcha / antiforgery,如图所示。

 Request URL:https://us16.admin.mailchimp.com/account/users/invite-post
 Request Method:POST

 --BODY
 email:[EMAIL]
 role:author
 welcome_msg:[Message] (Optional)
 g-recaptcha-response:[CAPTCH]
 __csrf_token:[TOKEN]

enter image description here