cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mail is not triggering when we recreate user on dropbox

mail is not triggering when we recreate user on dropbox

tsumit g.
Helpful | Level 6

Hi,

An Welcome email is not triggering when we create the deleted user again(re create). Can you let me know how to do this.

 

Thanks.

4 Replies 4

Greg-DB
Dropbox Staff

I also can't reproduce this. I tried creating a member, removing them, and creating them again, and I did receive two emails. Presumably this is related to your other thread. Did the removal and re-addition of the member succeed? If you're still seeing any issues, please share a sample.

(You can use /2/team/members/send_welcome_email to resend the email if you need though.)

tsumit g.
Helpful | Level 6

Hi Gregory,

I am sending the series of requests i am using to reproduce the issue. Can you let me know, whether i am doing correct or not. Still i am seeing the message "user_already_on_team"

Create the user request:

curl -X POST https://api.dropboxapi.com/2/team/members/add --header "Authorization: Bearer Bearer" --header "Content-Type: application/json" --data '{"new_members": [{"member_email": "abc@gmail.com","member_given_name": "test","member_surname": "abc","send_welcome_email": true, "role": {".tag":"member_only"}}]}'

Create Response :

{".tag": "complete", "complete": [{".tag": "success", "profile": {"team_member_id": "xxx", "account_id": "xxx", "email": "abc@gmail.com", "email_verified": false, "status": {".tag": "invited"}, "name": {"given_name": "test", "surname": "abc", "familiar_name": "test", "display_name": "test abc", "abbreviated_name": "ta"}, "membership_type": {".tag": "full"}, "groups": []}, "role": {".tag": "member_only"}}]}

 

Now, I am deleting the user with below curl command :

curl -X POST "https://api.dropboxapi.com/2/team/members/remove" -H "Authorization: Bearer Bearer" -H "Content-Type: application/json" -d '{"user": {".tag": "team_member_id","team_member_id": "xxx"}}'

Response : {".tag": "complete"}

Now, i am creating the same user again with the request above:

Create the user request:

curl -X POST https://api.dropboxapi.com/2/team/members/add --header "Authorization: Bearer Bearer" --header "Content-Type: application/json" --data '{"new_members": [{"member_email": "abc@gmail.com","member_given_name": "test","member_surname": "abc","send_welcome_email": true, "role": {".tag":"member_only"}}]}'

Create Response :

{".tag": "complete", "complete": [{".tag": "user_already_on_team", "user_already_on_team": "abc@gmail.com"}]}

 

Its not allowing me to create user again. Can you help me on this. Is any requests i am giving wrong. Can you guide.

 

Thanks in Advance.

 

Greg-DB
Dropbox Staff

Thanks for the additional details! Since you're getting the user_already_on_team error on the second addition attempt, it make sense that you're not getting the welcome email that second time.

That leaves the problem of why you are getting this error though. I still can't seem to reproduce this using these steps, so we'll need to look into it more specifically for you.

Please open an API ticket with the unredacted output so we can check on it. If you could also include the response headers, that would be helpful. (Just don't include the access token of course.) Thanks in advance! 

tsumit g.
Helpful | Level 6

Hi Gregory,

I have opened a API ticket. Is the API requests what i am sending is correct. Just wanted to know.

 

Thanks.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    tsumit g. Helpful | Level 6
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?