NAV Navbar
Logo
python

API Reference - Introduction

YellowAnt is an assistant bot that gets work done. YellowAnt makes it insanely easy to manage your code repositories, track issues and tasks for the day across multiple apps like Github, Bitbucket, Trello and Asana. YellowAnt helps you respond 2X faster to new issues or tickets, restores the sanity of discussions and events around you and makes you more productive. YellowAnt is delightfully easy to use and helps you seamlessly manage your workplace apps, get regular updates and take actions through simple, intuitive text commands. YellowAnt is even more powerful in your team Slack where you can quickly take actions, generate reports, pull data and do a lot more from within your Slack Channels and Groups!


Install YellowAnt on Python using Pip:
> pip install yellowant

from yellowant import YellowAnt

yellowant_user = YellowAnt(access_token="vadfsn043i@#$!41ub1dde23r89g2")

Registering your Application

To interact with YellowAnt users, you will first need to create an Application on the YellowAnt developers page.

Go to https://myteam.yellowant.com/developers/ and Register an application. Your application will need a valid Application name, invoke_name, API URL(where we will send all user commands) and redirect URL(where we will redirect the user after the user authenticates your application).

Writing Functions and Arguments

After creating your application, you will have to declare the functions which the user will invoke as commands. All functions have a “user_invoke_name” which, along with the application invoke name, will point to your function.

You will also need to declare the arguments to your functions so that YellowAnt can parse the necessary arguments and send to your application.

The final command, with the function name and parsed arguments will be sent to your application, along with a verification token, which is automatically created when you register your application.

User Authentication

YellowAnt uses the OAuth 2.0 Authentication protocol which allows you to get a YellowAnt user’s information through a token issued to your application.

You need to first register your application on the YellowAnt Developer Platform. The application is assigned a Client ID and Client Secret, which you will use to get a user’s token. You need to also provide a redirect_url where the user will be redirected to after authentication - more on that below.

YellowAnt OAuth works in 2 easy steps:

1. Authorization

Redirect your users to the following URLs

GET https://www.yellowant.com/api/oauth2/authorize/

Query Parameters

Parameter Description
client_id The client Id from your application developer page
response_type Set value to ‘code’
redirect_url The url to redirect the user after authentication
state The state variable to store any user information(optional)

2. Get User Token

from yellowant import YellowAnt

code = request.GET.get('code')
CLIENT_ID = 'oLuOCDCScer5oi9GBFWrfewei7238fFWef7c0oGNb6g5Q'
CLIENT_SECRET = '2m89fjXkTnh87d753x4fobFFwf@3netrcSQWSusqrtRu53s'

y = YellowAnt(app_key=settings.CLIENT_ID, app_secret=CLIENT_SECRET,
                  access_token=None,
                  redirect_uri=REDIRECT_URL)
access_token_dict = y.get_access_token(code)
access_token = access_token_dict['access_token']

user_yellowant_object = YellowAnt(access_token=access_token)

Once the user has authenticated, the user will be redirected to the redirect_url that you set in your application(and also passed in Step 1). The redirect url will contain two GET parameters: code - A temporary code that will be exchanged for a token state - The state variable passed in the URL in Step 1.

POST https://www.yellowant.com/api/oauth2/token/

The above command returns JSON structured like this:

{
  "access_token": "B69$9v7v6#8ydepiuXheTodDWDc33rVYXEviT4d3d",
  "expires": 31536000,
  "refresh_token": "ei7238fFWef7c0oGNb6gd34n087xb390yx8b4x8",  
}

Query Parameters

Parameter Description
client_id The client Id from your application developer page
client_secret The client secret from your application developer page
grant_type Set value to ‘authorization_code’
redirect_url The url to redirect the user after authentication
code The code obtained from the GET parameter

Revoking a user token

from yellowant import YellowAnt

user_yellowant_object = YellowAnt(access_token=access_token)
user_yellowant_object.revoke_token(token=access_token)

POST https://www.yellowant.com/api/oauth2/revoke_token/

The above command returns an HTTP_200 OK message

Query Parameters

Parameter Description
token The token to revoke

User

Get User Profile


yellowant_user = YellowAnt(access_token='sdfjbr32p89pdgDFF4p27cQd278p2DWcnp497f')
profile = yellowant_user.get_user_profile()

user_id = profile['id']
user_first_name = profile['first_name']
user_last_name = profile['last_name']

The endpoint returns the following JSON data


{
  "id": 432,
  "username": "h74d-r34f-4dsf-2drw-4r2ed",
  "first_name": "Howard",
  "last_name": "Sanchez",
  "is_active": true,
  "profile": {
    "nickname": "Hodor",
    "tz_string": "Asia/Kolkata",
    "tz_offset": 19800,
    "language": "en"
  }
}

Returns the profile details for the authenticated user.

POST https://api.yellowant.com/api/user/profile/

Query Parameters : None

Create a User Integration


yellowant_user = YellowAnt(access_token='sdfjbr32p89pdgDFF4p27cQd278p2DWcnp497f')
profile = yellowant_user.create_user_integration()

user_intergation_id = profile['user_application']
user_intergation_invoke_name = profile['user_intergation_invoke_name']

The endpoint returns the following JSON data

{
  "application": 27,
  "user_invoke_name": "github",
  "user_application": 132
}

Creates a new user integration for the authenticating application and user.

An application can create multiple user integrations for an authenticated user, so that the YellowAnt user can connect multiple application accounts. If the user already has atleast one integration of the current application, the invoke name will be automatically assiged as appname-number, number being the least occupied integration number. For example, the first user application will be named application (the default invoke_name of the application set in the application developer page), the next user application for the same application will be name application-2 and so on.

POST https://api.yellowant.com/api/user/integration/

Query Parameters : None

Delete a User Integration


yellowant_user = YellowAnt(access_token='sdfjbr32p89pdgDFF4p27cQd278p2DWcnp497f')
user_integration_id = 35245
profile = yellowant_user.delete_user_integration(id=user_integration_id)

The endpoint returns a HTTP 204 status with JSON response

{"message": "Successfully deleted"}

Deletes a user integration for the authenticating application and user.

DELETE https://api.yellowant.com/api/user/integration/<user-integration-id>/

Query Parameters : None

Update a User Integration


yellowant_user = YellowAnt(access_token='sdfjbr32p89pdgDFF4p27cQd278p2DWcnp497f')
user_integration_id = 27
profile = yellowant_user.update_user_integration(id=user_integration_id, user_invoke_name="github-vader")

On successful update, the endpoint returns a HTTP 204 status with JSON response

{
  "application": 27,
  "user_invoke_name": "github-vader",
  "user_application": 133
}

Updates a user integration for the authenticating application and user with the supplied user_invoke_name. In case of the user_invoke_name is invalid or is already being used by another user application, the endpoint will return a HTTP_406 error.

PATCH https://api.yellowant.com/api/user/integration/<user-integration-id>/

Query Parameters :

Parameter Description
user_invoke_name The new user invoke name for the user application

Receiving User Commands

Below is an example of a Python - Django Application View that handles an API URL request, processes the command and returns a message


# Sample POST request data to the API URL of a fictional Github application
{
  "data":'{
    "user": 4534,
    "verification_token": "bgwreASFth09243rWE134804tnb",
    "application": 5639,
    "application_invoke_name": "github-2",
    "function": 74645,
    "function_name": "create_issue",
    "event": 5043867,
    "args": {
      "repository":"sithlord/vader",
      "title": "Failed running `bundle exec middleman server`",
      "body": "I get this error when running bundle exec middleman server - /var/lib/gems/2.3.0/gems/middleman-core-4.2.1/lib/middleman-core/extensions.rb:96:in load: Tried to activate old-style extension: deploy. They are no longer supported. (RuntimeError). I am not a ruby developer so cannot find a way around this."
    }
  }'
}

# Handling the command request in the API URL
import json
from ghApp import CommandProcessor

#Receiving command request from the user in a Django view
def api_url(request):    
      data = json.loads(request.POST["data"])
      args = data["args"]
      service_application = data["application"]
      verification_token = data['verification_token']
      function_id = data['function']
      function_name = data['function_name']

      if verification_token == settings.verification_token:
        # Processing command in some class Command and sending a Message Object
        message = CommandProcessor(function_id, service_application, args, function_name).parse()
        # Returning message response
        return HttpResponse(message)
      else:
        # Handling incorrect verification token
        error_message = {"message_text":"Incorrect Verification token"}
        return HttpResponse(json.dumps(error_message), content_type="application/json")



Remember the application, functions and arguments you created above? Now it’s Magic Time!

Whenever a user sends a command on YellowAnt, YellowAnt parses the command string into a command object and sends your API URL the following data as a POST request:

Parameter Description
user The YellowAnt User Id
verification_token The verification token assigned to your application during registration. You can use this token to verify if the request is coming from the YellowAnt servers
application Your Application Id
application_invoke_name The invoke name the user has assigned to your application
function The Id of the function that the user has called. This is the same as the Id of the function you created in the developer page
function_name The name of the function the user has called. This is the same as the user_invoke_name of the function you created in the developer page
event The event Id associated with the command
args A JSON formatted argument list containing all the arguments parsed in the command that was declared by you in the developer application page

Message Formatting

Basic formatting

Sending a simple message response to an API URL call


import json
from yellowant.messageformat import MessageClass, MessageAttachmentsClass, MessageButtonsClass

#Receiving command request from the user in a Django view
def api_url(request):    
      data = json.loads(request.POST["data"])
      args = data["args"]
      service_application = data["application"]
      verification_token = data['verification_token']
      function_id = data['function']
      function_name = data['function_name']

      if verification_token == settings.verification_token:
        # Processing command in some class Command and sending a Message Object
        message = MessageClass()
        message.message_text = "I have received your command!"
        # Returning message response
        return HttpResponse(message.to_json())

        # Alternatively, you can send a simple JSON response like
        # return HttpResponse(json.dumps({"message_text":"I have received your command!"}))

      else:
        # Handling incorrect verification token
        error_message = {"message_text":"Incorrect Verification token"}
        return HttpResponse(json.dumps(error_message), content_type="application/json")

After processing the user command, you must respond with a message. YellowAnt messages consist of upper level formatting options along with attachments, attachment fields and attachment buttons.

Let’s look at the structure of a YellowAnt message - it consists of the following fields:

Field Description
message_text The text of the message
attachments The attachments for the message (Optional)

Message Attachments

Sending a message with attachment response to an API URL call


import json
from yellowant.messageformat import MessageClass, MessageAttachmentsClass, MessageButtonsClass

#Receiving command request from the user in a Django view
def api_url(request):    
      data = json.loads(request.POST["data"])
      args = data["args"]
      service_application = data["application"]
      verification_token = data['verification_token']
      function_id = data['function']
      function_name = data['function_name']

      if verification_token == settings.verification_token:
        # Processing command in some class Command and sending a Message Object
        message = MessageClass()
        message.message_text = "I have received your command!"

        attachment_1 = MessageAttachmentsClass()
        attachment_1.title = "This is first Attachment Title"
        attachment_1.title_link = "https://http://www.github.com/lord/slate/"
        attachment_1.text = "This is an attachment text"
        message.attach(attachment_1)

        attachment_2 = MessageAttachmentsClass()
        attachment_2.title = "This is second Attachment Title"
        attachment_2.text = "This is the attachment text for the second attachment"
        message.attach(attachment_2)


        # Returning message response
        return HttpResponse(message.to_json())
        # Alternatively, you can send a simple JSON response like
        # return HttpResponse(json.dumps({"message_text":"I have received your command!", "attachments":[{"title":"This is first Attachment Title", "title_link":"https://http://www.github.com/lord/slate/", "text": "This is an attachment text"},{"title":"This is second Attachment Title", "text": "This is the attachment text for the second attachment"}]}))

      else:
        # Handling incorrect verification token
        error_message = {"message_text":"Incorrect Verification token"}
        return HttpResponse(json.dumps(error_message), content_type="application/json")

Messages can also contain attachments - which are formatted as a list view within the main message. All fields are optional. Attachments contain the following fields:

Field(All optional) Description
title The title of the attachment
title_link The URL that the user will be taken to on clicking the title
text The text of the attachment
image_url The URL of the image for this attachment
thumb_url The URL of the thumbnail of the attachment
color The color of the attachment text
author_name The name of the author (if referenced in the attachment)
author_icon The icon URL representing the author (if referenced in the attachment)
author_link The link to the author (if referenced in the attachment)
footer Footer for the attachment
footer_icon The icon URL representing the footer information
pretext A fallback text before the attachment content
ts A Unix timestamp for the message, shown after the footer
fields An array of fields to be shown below the attachment
buttons An array of buttons to be showed below the attachment

Attachment Fields

Following is an example of a task management application listing details of open task tickets


tasks = [{
  "title":"Bundle middleman error fix",
  "body": "Getting this error when running bundle exec middleman server",
  "status":"open",
  "project":"PBL-1",
  "initiator":{
    "name":"Boo-Boo Bear",
    "id":"463",
    "url":"https://www.bitbucket.org/booboo/",
    "image_url":"https://www.jellystone.com/park/bears/booboo.jpg"
  },
  "priority":"high"
},{
  "title":"Dev Branch: Links to anchor tags load H1 rather than target link",
  "body": "I recently added static TOC/navigation to my flavor of slate and now, when an H2/H3/H4 link is loaded, it loads to the H1 anchor rather than the appropriate anchor linked.",
  "status":"open",
  "project":"PBL-1",
  "initiator":{
    "name":"Yogi Bear",
    "id":"461",
    "url":"https://www.bitbucket.org/yogi/",
    "image_url":"https://www.jellystone.com/park/bears/yogi.jpg"
  },
  "priority":"low"
}
]


message = MessageClass()
message.title = "Open JIRA tickets"
message.message_text = "Following are the open JIRA tickets for project PBL-1"

for task in tasks:
    attachment = MessageAttachmentsClass()
    attachment.title = task['title']
    attachment.author_name = task['initiator']['name']
    attachment.author_link = task['initiator']['url']
    attachment.author_icon = task['initiator']['image_url']

    field_status = AttachmentFieldsClass()
    field_status.title = "Status"
    field_status.value = task['status']
    attachment.attach_field(field_status)

    field_priority = AttachmentFieldsClass()
    field_priority.title = "Status"
    field_priority.value = task['status']
    attachment.attach_field(field_priority)

    message.attach(attachment)

return message.to_json()


Message attachments can also contain fields - which are defined as an array, and displayed in a table inside the message attachment. Attachments Fields contain the following fields:

Field Description
title The Title of the Field
value The value of the Field
short 0 if each field must occupy a row, 1 - if multiple fields can be displayed per row

Attachment Buttons

Following is an example of a task manegement application listing details of open task tickets and providing a button to close the task for every listed task


import json
from yellowant.messageformat import MessageClass, MessageAttachmentsClass, MessageButtonsClass

#Importing a fictional command processor, which will process the command
from project import command_processor

#Receiving command request from the user in a Django view
def api_url(request):    
      data = json.loads(request.POST["data"])
      args = data["args"]
      service_application = data["application"]
      verification_token = data['verification_token']
      function_id = data['function']
      function_name = data['function_name']

      if verification_token == settings.verification_token:


        if function_name == "get_open_tasks":
          project_id = args['project']
          # Processing command in a fictional command_processor class sending a Message Object
          tasks = command_processor.get_open_tasks(service_application, project_id)

          # The above function will return the following JSON Object of all open tasks
          """
          tasks = [{
            "title":"Ability to have nested file structure ",
            "body": "We need the ability to retain our repository's nested markdown file structure. Users may either read documentation in our repository or on the doc site.",
            "status":"open",
            "project":"PBL-1",
            "initiator":{
              "name":"Dick Dastardly",
              "id":"460",
              "url":"https://www.bitbucket.org/dd/",
              "image_url":"https://www.laffalympics.com/dd.jpg"              
            },
            "priority":"high"
          },{
            "title":"Non Latin support",
            "body": "It appears Lunr would need a new locale file for each language we want to support. Is that correct? Just checked their documentation but could use some guidance to get started",
            "project":"PBL-1",
            "status":"open",
            "initiator":{
              "name":"Muttley Mutt",
              "id":"467",
              "url":"https://www.bitbucket.org/muttley/",
              "image_url":"https://www.laffalympics.com/muttley.jpg"
            },
            "priority":"low"
          }]
          """

          message = MessageClass()
          message.title = "Open JIRA tickets"
          message.message_text = "Following are the open JIRA tickets for project PBL-1"

          for task in tasks:
            attachment = MessageAttachmentsClass()
            attachment.title = task['title']
            attachment.author_name = task['initiator']['name']
            attachment.author_link = task['initiator']['url']
            attachment.author_icon = task['initiator']['image_url']

            field_status = AttachmentFieldsClass()
            field_status.title = "Status"
            field_status.value = task['status']
            attachment.attach_field(field_status)

            field_priority = AttachmentFieldsClass()
            field_priority.title = "Status"
            field_priority.value = task['status']
            attachment.attach_field(field_priority)

            #Clicking on this button will call the close_task() function() on the application
            button_status_close = MessageButtonsClass()
            button_status_close.text = "Close Ticket"
            button_status_close.value = "close"
            button_status_close.name = "close"    

            #We now associate the command to a command object. 
            #The 'service_application' value is the Id of the user integration you want the button to call. This can be the current user integration that is sending you this command, which we have already captured in the 'service_application' variable above. 
            #The 'service_application' can also be another user integration from a third party application, provided the user has given your application the permission to access the user's third party application. For example, the current taks management application can also add a button to one of the user's Email application integration like GMail. More on third party app permissions below
            #The 'called_function' is an integer that is the function Id of the function you want to call. You can get this in your Application's Developer page.
            #The 'data' is a dictionary of arguments to pass to the application function

            button_status_close.command = {"service_application": self.user_integration, "called_function": 6, 
                                      "data": {"id":task['id'], "project": task.project}
                                      }
            attachment.attach_button(button_status_close)

          message.attach(attachment)

          return message.to_json()

        #Handling the case where the command is 'close_task', and the arguments are project and id
        elif if function_name == "close_task":
          task_id = args['id']
          task_project = args['project']
          # Processing command in a fictional command_processor class sending a Message Object
          tasks = command_processor.close_task(service_application, task_project, task_id)
          m = MessageClass()
          m.message_Text = "The ticket is successully closed!"


      else:
        # Handling incorrect verification token
        error_message = {"message_text":"Incorrect Verification token"}
        return HttpResponse(json.dumps(error_message), content_type="application/json")

Message attachments can also contain interactive buttons - which are defined as an array, and displayed in a row at the bottom of the attachment area

Field Description
text The text displayed opn the button
value The value associated with the button
name A value that helps you categorize each button into groups
command The command object in JSON format

Attachment Button Commands

YellowAnt enables you to encode a command of your application or another third party user application(if the user has authorized you to encode the third party application’s commands in your application) inside a button. This command will point to one of your declared functions with arguments to supply to the function. When the user clicks on the button, YellowAnt will send the command object to your API URL(or to the third party application) and you can handle it in the same way you handle a regular command.

The Command Object has the following format:

Field Description
service_application The user integration id of the application you want the button to call
called_function The function Id of the application
data A JSON representation of the function arguments. For example: {"repo_id":"skywalker", "issue_id":"469"}

Messages

Sending Messages

YellowAnt allows you to send messages to the user in case of new updates or events.

Field Description
message_text The text of the message
requester_application The Id of the user integration to send this message to (that you acquired during create user integration as user_integration)
attachments The attachments for the message (Optional)


import json
from yellowant.messageformat import MessageClass, MessageAttachmentsClass, MessageButtonsClass
from yellowant import YellowAnt

#Fetching user details and toke from DB
user_obj = FictionalUserDB.objects.get(user_id=435)
user_token = user_obj.yellowant_access_token

#Initializing the YellowAnt User integration object with token acquired during authentication (OAuth2)
user_integration_object = YellowAnt(access_token = user_token)

#Creating a message
message = MessageClass()
message.message_text = "There is new pull request in repo argus/bolo from Perry Johnson"

#adding an attachment for details
attachment = MessageAttachmentsClass
attachment.title = "Pull Request Details"

#adding created at field
field_created = AttachmentFieldsClass()
field_created.title = "Created"
field_created.value = "2 hours ago"
attachment.attach_field(field_created)

#adding status at field
field_status = AttachmentFieldsClass()
field_status.title = "Status"
field_status.value = "Pending"
attachment.attach_field(field_status)

message.attach(attachment)

#Sending message to YellowAnt user integration
send_message = yellowant_user_integration_object.add_message(requester_application = user_integration_object.user_integration_id, **message.get_dict())

POST https://api.yellowant.com/api/user/message/

Get Application Messages


yellowant_user = YellowAnt(access_token='sdfjbr32p89pdgDFF4p27cQd278p2DWcnp497f')
user_integration_id = 59
profile = yellowant_user.get_application_messages(user_integration_id=user_integration_id)

The endpoint returns a HTTP 200 status with JSON response

{
  "count": 3,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 670,
      "user": {
        "id": 2,
        "username": "hjr8-432b-423f-4h9f-3nid3",
        "first_name": "Jason",
        "last_name": "Jones"
      },
      "is_user": 0,
      "message_text": "Here are the contacts you searched for!",
      "requester_application": {
        "id": 59,
        "application": {
          "id": 9,
          "name": "Google Contacts",
          "invoke_name": "gcontacts",
          "icon_url": "http://icons.iconarchive.com/icons/dtafalonso/android-lollipop/512/Contacts-icon.png"
        },
        "user_invoke_name": "gcontacts"
      },
      "has_attachment_flag": 1,
      "attachments": [
        {
          "id": 219,
          "attachment_type": 0,
          "attachment_number": 1,
          "image_url": "",
          "thumb_url": "",
          "color": "",
          "text": "",
          "author_name": "",
          "author_icon": "",
          "footer": "",
          "footer_icon": "",
          "pretext": "",
          "title": "",
          "title_link": "",
          "status": 0,
          "ts": 0,
          "author_link": "",
          "fields": [
            {
              "title": "Jill Donahue",
              "short": 0,
              "value": "<mailto:jilld@gmail.com|Email>"
            },
            {
              "title": "Jill Donahue",
              "short": 0,
              "value": "<mailto:jilld@qbeeko.com|Email>"
            },
            {
              "title": "Ankur Shrivastava",
              "short": 0,
              "value": "<mailto:ankur@globevestor.com|Email>"
            }
          ],
          "buttons": []
        }
      ],
      "upload_time": "2017-05-19T22:00:02Z"
    },
    {
      "id": 668,
      "user": {
        "id": 2,
        "username": "hjr8-432b-423f-4h9f-3nid3",
        "first_name": "Jason",
        "last_name": "Jones"
      },
      "is_user": 0,
      "message_text": "Hey! I am not integrated with your Google Contacts account. You can integrate it in the application settings page",
      "requester_application": {
        "id": 59,
        "application": {
          "id": 9,
          "name": "Google Contacts",
          "invoke_name": "gcontacts",
          "icon_url": "http://icons.iconarchive.com/icons/dtafalonso/android-lollipop/512/Contacts-icon.png"
        },
        "user_invoke_name": "gcontacts"
      },
      "has_attachment_flag": 0,
      "attachments": [],
      "upload_time": "2017-05-19T21:59:38Z"
    },
    {
      "id": 666,
      "user": {
        "id": 2,
        "username": "hjr8-432b-423f-4h9f-3nid3",
        "first_name": "Jason",
        "last_name": "Jones"
      },
      "is_user": 0,
      "message_text": "Ola! A new Google Contacts Integration was added by you. To get the commands associated with this application, just type: gcontacts help",
      "requester_application": {
        "id": 59,
        "application": {
          "id": 9,
          "name": "Google Contacts",
          "invoke_name": "gcontacts",
          "icon_url": "http://icons.iconarchive.com/icons/dtafalonso/android-lollipop/512/Contacts-icon.png"
        },
        "user_invoke_name": "gcontacts"
      },
      "has_attachment_flag": 0,
      "attachments": [],
      "upload_time": "2017-05-19T21:59:24Z"
    }
  ]
}

Lists the messages(paginated) for the user_integration Id

GET https://api.yellowant.com/api/user/applications/<user-integration-id>/messages/

Query Parameters : None

Get Application Message


yellowant_user = YellowAnt(access_token='sdfjbr32p89pdgDFF4p27cQd278p2DWcnp497f')
user_integration_id = 35245
message_id = 670
profile = yellowant_user.get_application_message(user_integration_id=user_integration_id, message_id=message_id)

The endpoint returns a HTTP 200 status with JSON response

{
  "id": 670,
  "user": {
    "id": 2,
    "username": "hjr8-432b-423f-4h9f-3nid3",
    "first_name": "Jason",
    "last_name": "Jones"
  },
  "is_user": 0,
  "message_text": "Here are the contacts you searched for!",
  "requester_application": {
    "id": 59,
    "application": {
      "id": 9,
      "name": "Google Contacts",
      "invoke_name": "gcontacts",
      "icon_url": "http://icons.iconarchive.com/icons/dtafalonso/android-lollipop/512/Contacts-icon.png"
    },
    "user_invoke_name": "gcontacts"
  },
  "has_attachment_flag": 1,
  "attachments": [
    {
      "id": 219,
      "attachment_type": 0,
      "attachment_number": 1,
      "image_url": "",
      "thumb_url": "",
      "color": "",
      "text": "",
      "author_name": "",
      "author_icon": "",
      "footer": "",
      "footer_icon": "",
      "pretext": "",
      "title": "",
      "title_link": "",
      "status": 0,
      "ts": 0,
      "author_link": "",
      "fields": [
        {
          "title": "Jill Donahue",
          "short": 0,
          "value": "<mailto:jilld@gmail.com|Email>"
        },
        {
          "title": "Jill Donahue",
          "short": 0,
          "value": "<mailto:jilld@qbeeko.com|Email>"
        },
        {
          "title": "Ankur Shrivastava",
          "short": 0,
          "value": "<mailto:ankur@globevestor.com|Email>"
        }
      ],
      "buttons": []
    }
  ],
  "upload_time": "2017-05-19T22:00:02Z"
}

Lists the message for the message-id anf application-id

GET https://api.yellowant.com/api/user/applications/<user-integration-id>/messages/<message-id>

Query Parameters : None

Errors

The YellowAnt API uses the following error codes:

Error Code Meaning
400 Bad Request – Your request to the url is incorrect
401 Unauthorized – Your API key is wrong
403 Forbidden – It is forbidden to access this page
404 Not Found – The specified url could not be found
405 Method Not Allowed – You tried to access the url with an invalid method
406 Not Acceptable – You requested a format that isn’t json
410 Gone – The url requested has been removed from our servers
429 Too Many Requests – You are sending too many requests
500 Internal Server Error – We had a problem with our server. Try again later.
502 Bad Gateway – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarily offline for maintenance. Please try again later.
504 Gateway Timeout – The YellowAnt servers are up, but the request could not be processed