Instagram Authentication

Authentication

In order to make requests to the Instagram API you first need to register an application (Instagram calls it a client). The developer section at Instagram.com lets you register a new client or simply manage existing clients.

An application has a client ID that is used to identify your app when making request to the API. An application also has a client secret that together with the client ID is used during authentication.

For endpoint methods that doesn't require a user context, the client ID is sufficient. This includes getting the media of a user with a known ID.

Getting started

The InstagramService class is the entry point in Skybrud.Social for accessing the Instagram, so if you already have a access token, you can initialize a new instance like:

@using Skybrud.Social.Instagram

@{

    InstagramService service = InstagramService.CreateFromAccessToken("your access token");

}

The examples within this documentation are mostly based on an instance of this class.

If you don't have an access token - or need to get access tokens on behalf of your users - you can also set up an authentication page instead.