Agent and Administrator
What is it?
There are many responses to different API commands like Failed, Success, Ambiguous.
Who will use it?
How is it used?
FogBugz itself supports several methods of logging on, however, the only method supported by the API is by providing an email address (or full name, just like FogBugz sign-in) and password in the logon method:
Every response that you will receive when execute the above login URL using API token will have enough information for you to understand what it is. So that necessary action can be taken to resolve it.
Response 1:- (Failed Logon)
If you receive below opaque string as a response to the login URL that confirms its a login failed( Possible reasons email or password doesn’t match, 2FA might be turned on, etc)
<response><error code="1">Error Message To Show User</error></response>
Response 2:- (Login Successful)
If you receive below opaque string as a response to the login URL that confirms you are logged in successfully.
Note – This token will persist until you execute a logoff command. (Token reuse is encouraged over issuing repeat logon commands.)
Response 3:-(Ambiguous logon)
If you receive below opaque string as a response to the login URL that confirms there is more than one FogBugz user with that email address.
<error code="2">Ambiguous Logon</error>
Note – FogBugz will supply you with a list of full names; you must provide the appropriate full name to log on.
If, for example, you got that response, you would prompt the user with a combo box to choose if they are User1 or User2. If you are User1, you would try logging on again with this URL: http://www.example.com/api.asp?cmd=logon&email=User1&password=BigMac
You can pass the token to the logon command to find API Token validity
If you receive below opaque string as a response to the login URL that confirms your API Token is VALID <response><token>[your_token]</token></response>
If you receive below opaque string as a response to the login URL that confirms your API Token is INVALID.
<response><error code="3">Not logged in</error></response>