Skip to content

Account

Ramtin Jokar edited this page Sep 28, 2018 · 12 revisions

Account functions is in InstaApi.AccountProcessor class.

Note: this is related to your own account. you can do these jobs with this class:

How can I get my own profile for editing purpose?

var requestForEditProfile = await InstaApi.AccountProcessor
    .GetRequestForEditProfileAsync();

How can I edit my profile?

string name = "Ramtin Jokar"; // leave null if you don't want to change it
InstaGenderType? gender = InstaGenderType.Male; // leave null if you don't want to change it
string email = "[email protected]"; // leave null if you don't want to change it
string url = ""; // leave empty if you have no site/blog | leave null if you don't want to change it
string phone = "+989171234567"; // leave null if you don't want to change it
string biography = "C# Programmer\n\nIRaN/FARS/KaZeRouN"; // leave null if you don't want to change it
string newUsername = ""; // leave empty if you don't want to change your username

var editProfile = await InstaApi.AccountProcessor.EditProfileAsync(name, biography, url, email, phone, gender, newUsername);

How can I change my name and my phone number?

string name = "Ramtin Jokar";
string phone = "+989171234567";
var setNameAndPhone = await InstaApi.AccountProcessor
                .SetNameAndPhoneNumberAsync(name, phone);

How can I change my biography?

string bio = "C# Programmer\n\nIRaN/FARS/KaZeRouN";
var setBiography = await InstaApi.AccountProcessor
                .SetBiographyAsync(bio);

Account example class

You can set profile, change phone number, change/remove profile picture, story settings, security settings(enable/disable two factor and get two factor backup codes).

Clone this wiki locally