2

I looked over the API documentation and I didn't see anything about how to get logos, but plaid clearly has them as they appear in the link app. Is there any way that I can also get access to those logo as part of the API or through another mechanism using an "Item" id?

Jeff Hutchins
  • 707
  • 7
  • 20

3 Answers3

11

While not documented at the time of this writing, it apparently can be done by adding an options parameter to a institution request with the value of {"include_display_data": true}. With the node API using the getInstitutionById method and Vangaurd it looks like this.

client.getInstitutionById('ins_108768', {include_display_data: true} (err, result) => {
 // Handle err
 const logo = result.institution.logo;
});

The value of logo will either be null or a base64 encoded string containing the binary data of the logo.

Jeff Hutchins
  • 707
  • 7
  • 20
  • Was this with the old API version? I am getting "the following fields are not recognized by this endpoint: Options" when accessing /institutions/get_by_id – RIanGillis Apr 10 '18 at 14:47
  • This a curl example of the request to get a logo. (set your own a public key) `curl -X POST https://sandbox.plaid.com/institutions/get_by_id \ -H 'Content-Type: application/json' \ -d '{ "institution_id": "ins_108968", "public_key": "YOUR_PUBLIC_KEY", "options": { "include_display_data": true} }'` – Alex Kojin Sep 20 '18 at 11:05
3

The current version of a plaid ruby gem(6.1.0) doesn't retrieve a logo but you can extend a plaid library and use include_display_data parameter to get a logo.

module Plaid
  class Institutions < BaseProduct

    def get_by_id_with_logo(institution_id)
      post_with_public_key 'institutions/get_by_id',
                           SingleInstitutionResponse,
                           institution_id: institution_id,
                           options: { include_display_data: true }
    end
  end
end

Usage:

ins = client.institutions.get_by_id_with_logo(YOUR_INSTITUTION_ID)
puts ins.institution[:logo]
Alex Kojin
  • 5,044
  • 2
  • 29
  • 31
2

To get a list of all institutions from Plaid API one needs to hit /institutions/get with a POST request. To get logos and other institution attributes such as home page URL and brand color one needs to add options attribute in the body of the request with a key=>value pair of "include_optional_metadata" => true. The count parameter indicates the number of institutions you want returned (perPage) while offset is the number of institutions to skip.

curl -X POST \
https://sandbox.plaid.com/sandbox/institutions/get \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
        "client_id": "clientIdFromPlaidDashboard",
        "secret": "secretFromPlaidDashboard",
        "count": 500,
        "offset": 0,
        "options" => [
            "include_optional_metadata" => true
         ]
    }'

Expected response from Plaid doc:

http code 200
{
  "institutions": [
    {
      "country_codes": ["US"],
      "credentials": [{
        "label": "User ID",
        "name": "username",
        "type": "text"
       }, {
        "label": "Password",
        "name": "password",
        "type": "password"
      }],
      "has_mfa": true,
      "institution_id": "ins_109508",
      "mfa": [
        "code",
        "list",
        "questions",
        "selections"
      ],
      "name": "First Platypus Bank",
      // the following are included when
      // options.include_optional_metadata is true
      "primary_color": "#1f1f1f",
      "url": "https://plaid.com",
      "logo": null,
      ]
    }
  ],
  "request_id": "m8MDnv9okwxFNBV",
  "total": 1
}
Daniel Mbeyah
  • 297
  • 3
  • 5