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.
Hello @Rasmus Wulff Jensen ! Can I ask a question about API call "Update a field on a List".
Update a list
These Api call allows to update fields on the list. One of the option (fields) is 'subscribed'. But I can not see such an field on the list
When I send 'subscribed' with value eather true or false I am getting back 200 status code. But when I try to retrive back such a field I get null. Then I try to send any word instead of valued field and I get 200 status code back.
So it looks that theris no field 'subscribed' and API did not show any error message about wrong query parameters that is being send to server while use API call 'Update a field on a list'
But maybe I dont understand something.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is how you subscribe:
PUT
https://trello.com/1/lists/{{listId}}?key={{key}}&token={{token}}&subscribed=true
Here is how you get the data back:
GET
https://trello.com/1/lists/{{listid}}?key={{key}}&token={{token}}&fields=id,name,subscribed
or
https://trello.com/1/lists/{{listid}}?key={{key}}&token={{token}}&fields=all
(to see everything)
***
In general, "&fields=all" will reveal tons of extra fields on almost any Trello object, so a good way to find/debug
Another good way is to use Browser Tools on Trello.com, as they (Trello) are internally also using this API:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.