Hello to all! Thank you trello team for fantastic product.
Me and my friend qa students, recently we started to explore Trello API, by the way it is one of the best API fully described. We even write small testing poduct (java+TestNG+Cucumber+Allure). So far everithing went well but.
Theris one API call that is not behave as described in API.
Boards -> Invite Member to Board via email
It looks that query parameter 'type' is not being recognized by server and it returnes bad member type and the user with mentioned email is not being added to a board.
Or maybe we just use it wrong. )))
Thank you! We use free version.
If to send API call (HTTP PUT) with query parameter as 'type' and with value 'admin' or 'observer' we got back Bad member type. For value 'normal' it is work as expected.
We play a little bit with that request, it looks that if instead of 'type' send 'memberType' than for all the values it works as 'normal'.
In any way, the idea was to test an API call when you add member to a board with different values of query parameter 'type'. And since the request was sent with value for example admin we expected the member being added as admin. But there are as I can see now different logic of that API call for free versio and paid.
Have a nice weekend.
I've just tested in more detail, and I think I know what's going on here:
Trello Version | Add Existing Member to board | Add Member to board via Email Invite |
Free |
Observer = ⛔ |
Observer = ⛔ |
Paid | Observer = ✅ Normal = ✅ Admin = ✅ |
Observer = ✅ Normal = ✅ Admin = ⛔ |
If you change your query param to 'memberType' instead on 'type', you are essentially just leaving out the type, and the API default to 'normal', so that is not the solution.
So why the fails?:
So there is no bugs or wrong type in the API. Just the same logic as the Trello Interface
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The possible 'type' value for Member is: "admin", "normal", "observer" (or "ghost" for a member already invited but have not accepted but invalid in this case)
Endpoints
https://api.trello.com/1/boards/{id}/members/{idMember}?type={type}&key=APIKey&token=APIToken
Or
https://api.trello.com/1/boards/{id}/members?email={email}&key=APIKey&token=APIToken
Please note that the calls need to be 'PUT' and not 'POST'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dmitrii
Can you confirm what member type you are trying to add?
It may be that you are trying to invite as observers? If so, observer is not a valid member type for the free Trello subscription and is only available in paid versions.
This is an optional parameter. Does it work if you don't set that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.