Check if using Free plan

Matthew Henderson's Avatar

Matthew Henderson

10 Apr, 2013 10:12 PM

Is there a way to check if a domain is using the Free plan through the API?

The free plan limits features, such as archiving, and we want to make sure those features aren't enabled if the plan doesn't allow them.

  1. Support Staff 1 Posted by brandi on 10 Apr, 2013 11:57 PM

    brandi's Avatar

    Hi Matthew,

    Which account is this for?

    Thanks,
    Brandi

  2. 2 Posted by Matthew Henders... on 10 Apr, 2013 11:59 PM

    Matthew Henderson's Avatar

    We need to be able to check this for any account.

    We are trying to make it so our client app does not allow accounts on the free plan to do things like archive projects

  3. Support Staff 3 Posted by Tiger Team on 11 Apr, 2013 12:12 AM

    Tiger Team's Avatar

    Hmm. Good question. Let me see/add that for you.

  4. Support Staff 4 Posted by Tiger Team on 11 Apr, 2013 12:38 AM

    Tiger Team's Avatar

    ok, I'll add that to the API. It'll be at /plans.xml and will look like this

    <hash>
      <plan>Friend</plan>
      <free type="boolean">true</free>
      <users type="integer">0</users>
      <projects type="integer">0</projects>
      <storage type="integer">52428800000</storage>
    </hash>
    

    I'll update this discussion when we deploy it.

  5. 5 Posted by Julien on 12 Apr, 2013 12:25 AM

    Julien's Avatar

    Hi Matthew,

    We just deployed this. You can now query /plan.xml (no s). Be aware that you will need a token that identifies you as the account owner, or login/password of the account owner, as he/she is the only one who can access this information.

    Let me know how it goes.

  6. 6 Posted by Julien on 17 Apr, 2013 05:19 PM

    Julien's Avatar

    Hey Matthew,

    Just wanted to check back on you to see if the solution we implemented worked out for you.

    Thanks!

  7. 7 Posted by Matthew Henders... on 22 Apr, 2013 05:01 PM

    Matthew Henderson's Avatar

    This helps except that the Free account supports two users and one of those users isn't the account owner so there still seems to be no way using the API to know that certain features should be disabled for the non-account-owner-using-a-free-account

  8. 8 Posted by Julien on 22 Apr, 2013 05:26 PM

    Julien's Avatar

    The /plan.xml will only respond to an account owner, so you can use that to know if you are an account owner or not, but this also means that if you are a regular user, you can't know which plan you are on.

    How do your users authenticate: using a token, login/password? Do they share a token or does each user has its own? I' trying to see how we can provide with a scheme that gives you all the information you need without leaking stuff we shouldn't.

  9. 9 Posted by Matthew Henders... on 22 Apr, 2013 05:43 PM

    Matthew Henderson's Avatar

    users login with their login/password.

    We really don't care what the account plan is -- we just want to know if the project can be archived or not.

    The reason we want to disable the UI is that even on a free account an archive call performed using the API will archive the project -- which could lead to confusion.

  10. 10 Posted by Julien on 23 Apr, 2013 05:11 PM

    Julien's Avatar

    Hi Matthew,

    As a first step, I fixed the API: if you try to set a project to archived while on the free plan, you will now get an error back: "Arcihved can't be set: you are on the Free plan".

    I am still not sure what is the best way to let you know "in advance", but that should help.

  11. 11 Posted by Matthew Henders... on 24 Apr, 2013 07:03 PM

    Matthew Henderson's Avatar

    Thanks for your help. This is enough so that we no longer need to worry about a user getting into an incorrect state.

  12. Matthew Henderson closed this discussion on 24 Apr, 2013 07:03 PM.

Discussions are closed to public comments.
If you need help with Lighthouse please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac