Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there any API available to get check trello user account is "General" or "Trello Gold"?

Gmanik446 September 17, 2017

I am using trello attachments API to attach files to Trello card. There are limitations on file sizes. 

There is a 10 MB file upload limit per attachment. However, Business Class and Trello Gold members have a 250 MB file upload limit per attachment.

I need to do below validations, before attaching file to Trello card.

1.If account type is general, check file size is <=10 MB.

2.If account type is not general, check file size is <=250MB. 

 

To perform these validations, I need to get the account details of trello user.  I'd appreciate any suggestions.

1 answer

1 accepted

1 vote
Answer accepted
Dan Lew
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 18, 2017

If you make a request to https://trello.com/1/members/me (or replace "me" with a user ID) then it returns an object that includes a "premiumFeatures" array. If it includes the "largeAttachments" feature then you're good to go.

(You can also get all sorts of good info on the user with this API call, see more here: https://developers.trello.com/v1.0/reference#membersid)

Gmanik446 September 18, 2017

Thanks @Dan Lew. I got below response when I make a request to https://trello.com/1/members/me.

AP Response.PNG

I would like to know what does mean by memberType in above response. Can I use this property to validate attachment file size. If yes, could you please list down the all possible values of memberType property?

Dan Lew
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 19, 2017

I wouldn't use "memberType" to determine attachment size. Checking the "premiumFeatures" array is best because it accounts for all the ways that a user could acquire the ability to upload large attachments.

Currently, there are two ways the user can gain the ability to upload large attachments - either the user has Trello Gold, or they're a member of a Business Class team. Checking both of those states is much more tedious than just checking the "premiumFeatures" array. It'll also work better in the long run, in case we ever added more ways to enable large attachment uploads.

Gmanik446 September 19, 2017

Thanks for your quick response. I got your point.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events