Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
tsumit g.
9 years agoHelpful | Level 6
mail is not triggering when we recreate user on dropbox
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
- Greg-DB9 years ago
Dropbox Community Moderator
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.9 years agoHelpful | 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-DB9 years ago
Dropbox Community Moderator
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.9 years agoHelpful | 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.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!