Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added new methods call to index page to better visibility

...

List of methods available in FlockOS

Anchor
CallingConventions
CallingConventions
Calling a method

...

To call a method, an app will need to pass a an authentication token for the user on behalf of whom the method is being called. This can either be the user (either a normal user or a bot).

For normal users, you receive this user token in the app.install event.

For a bot, you can see the token in the developer dashboard once after you enable it.

This token is passed as the token parameter in the HTTP request that calls the method.

...

Error CodeHTTP StatusDescriptionAdditional Attributes
InvalidRequestData400The request was malformed 
InvalidParameter400A parameter for the method call is missing or invalid
  • parameter – name of the missing paramenter
MissingUserToken400Missing user token in the method request 
InvalidUserTokenInvalidToken403An invalid user authentication token was sent with the request 
AppDisabled403App has been disabled for this user
  • disabledBy – one of user or team
NoSuchMethod404The method named in the request URL does not exist 
HTTPMethodNotAllowed405An HTTP method other than POST was used 
RequestTimeout408A timeout occured before the server could receive the complete request from the app 
TooManyRequests429Rate limit reached 
InternalServerError500An unexpected condition was encountered 
ServiceUnavailable503The API service is unavailable at this time