4

1

It appears that you have to use a licensed account in order to initiate a transaction with the api. There seems like there should be a better way of getting a stable token. The reason I'm asking this is because you wind up having to expose one of your account passwords in your code if you want to have the api function from inside one of your projects.

It also seems like a problem passing an unencrypted username and password in the clear in a url string.

Have I missed something here or is this really the way the api is implemented?

UPDATE: Ok, so it looks like the api wants to play fast and loose with one of my accounts. That just seems like a poor design to me. How about this as a feature request:

Let an administrator create a semi-permanent token inside the FogBugz admin tools. Don't allow that token to be used as a normal login, but instead let it provide credentials through the api. Allow the admin to create a non-license requiring name to be associated with token like "MyProject Website" or "API Generated".

The token can then be used by the project to submit api calls. If it gets compromised, the administrator could change it and let the developers know they need to modify their code to reflect the new token. It would be nice if a toke was generated automatically upon creating a new project. A global token unassociated with a project would be nice, too, but not as necessary.

What do you think?

flag

1 Answer

2

  • You don't need to store the username and password in your code to get a new token with cmd=logon every time. You can get the token once and put that in your code instead of the username and password.

  • If you are concerned about transmitting passwords in the clear, you can configure your site to use https, but that's not unique to the API.

See also this post on token persistence.

link|flag
If you do this, you'd have to make sure no one ever issued a cmd=logoff using that token – Daniel LeCheminant May 21 2010 at 16:50
I have more of an issue with everybody that has access to code has my fogbugz username and password and can access my account. If I change my password, I wind up breaking the integration with the system. Something just seems wrong with that approach. – Mike May 22 2010 at 19:10
@Mike: Actually, with Ted's suggestion, anyone that has access to your code will have access to a FogBugz token, which would allow them to issue API commands with your permissions. However, they would not have your username and password; you wouldn't need to embed them in your code because you'd never be issuing a cmd=logon command ... because you'd already have a token! – Daniel LeCheminant May 22 2010 at 21:40
Hmmmm. That sounds like a pretty good workaround. I'll have to give it a shot. – Mike May 23 2010 at 17:01

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.