HGO

  • Menu
  • Menu
  • Menu
  • Menu
    • SubMenu1
    • SubMenu2
    • SubMenu3
  • Menu
    • SubMenu1
    • SubMenu2
    • SubMenu3
    • SubMenu4
Home › Uncategories › API Endpoints

API Endpoints

By Bang HGO Rabu, 20 Maret 2019 Add Comment Edit

API Endpoints

Once you've registered your client it's easy to start requesting data from Instagram.
All endpoints are only accessible via https and are located at api.instagram.com. For instance: you can retrieve photos with a given hashtag by accessing the following URL with your access_token (replace ACCESS-TOKEN with your own):
https://api.instagram.com/v1/self/media/recent?access_token=ACCESS_TOKEN
The Instagram API requires an access_token from authenticated users for each endpoint. We no longer support making requests using just the client_id.

Note

The URL examples throughout this documentation use ACCESS-TOKEN as a placeholder. For these examples to work, you need to substitute the value with your own access_token. In your application, you should have each user go through an authentication and authorization flow in order to receive a valid access_token.

Limits

Please refer to the limits documentation for information on rate limits that apply to API requests.

Deleting Objects

We do our best to have all our URLs be RESTful. Every endpoint (URL) may support one of four different http verbs. GET requests fetch information about an object, POST requests create objects, PUT requests update objects, and finally DELETE requests will delete objects.

Structure

The Envelope

Every response is contained by an envelope. That is, each response has a predictable set of keys with which you can expect to interact:
{
    "meta": {
        "code": 200
    },
    "data": {
        ...
    },
    "pagination": {
        "next_url": "...",
        "next_max_id": "13872296"
    }
}

meta

The meta key is used to communicate extra information about the response to the developer. If all goes well, you'll only ever see a code key with value 200. However, sometimes things go wrong, and in that case you might see a response like:
{
    "meta": {
        "error_type": "OAuthException",
        "code": 400,
        "error_message": "..."
    }
}

data

The data key is the meat of the response. It may be a list or dictionary, but either way this is where you'll find the data you requested.

pagination

Sometimes you just can't get enough. For this reason, we've provided a convenient way to access more data in any request for sequential data. Simply call the url in the next_url parameter and we'll respond with the next set of data.
{
    ...
    "pagination": {
        "next_url": "https://api.instagram.com/v1/self/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&max_id=13872296",
        "next_max_id": "13872296"
    }
}
On views where pagination is present, we also support the "count" parameter. Simply set this to the number of items you'd like to receive. Note that the default values should be fine for most applications - but if you decide to increase this number there is a maximum value defined on each endpoint.

JSONP

If you're writing an AJAX application, and you'd like to wrap our response with a callback, all you have to do is specify a callback parameter with any API call:
https://api.instagram.com/v1/self/media/recent?access_token=ACCESS-TOKEN&callback=callbackFunction
Would respond with:
callbackFunction({
    ...
});

Share this post

0 Response to "API Endpoints"

Posting Komentar

Posting Lebih Baru Posting Lama Beranda
Langganan: Posting Komentar (Atom)

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel

insert_pixel_code_here

Mengenai Saya

Foto saya
Bang HGO
Lihat profil lengkapku

Arsip Blog

  • ▼  2019 (23)
    • ▼  Maret (23)
      • Platform Policy
      • Platform Changelog
      • Developer Support
      • Libraries
      • Android Intents
      • iPhone Hooks
      • Mobile Sharing
      • Embedding
      • Comment Endpoints
      • User Endpoints
      • API Endpoints
      • Secure Requests
      • Sandbox Mode
      • Permissions Review
      • Login Permissions (Scopes)
      • Authentication
      • Libraries We Use
      • Platform Policy
      • Kebijakan Data Instagram
      • Ketentuan Penggunaan
      • Introducing Checkout on Instagram
      • About Us Head of Instagram
      • Tentang Instagram
Diberdayakan oleh Blogger.
  • About
  • Contact
  • Privacy Policy
  • Disclaimer
Copyright 2018 HGO