-
Notifications
You must be signed in to change notification settings - Fork 241
Create new account
You can create new account with phone number and email with InstagramApiSharp.
Remember don't try to create new account with free proxy.
There are 4 step you should do for create new account.
Note: for example this is our credential and information:
var phoneNumber = "989123456789"; // your phone number with country code
var username = "rmt4006";
var password = "rmt12345678";
var firstName = "Ramtin";
var verificationCode = ""; // code that you will received with sms
First you should check that your phone can create new account or not.
var checkPhone = await InstaApi.CheckPhoneNumberAsync(phoneNumber);
if you passed step 1(with checkPhone.Succeeded
), you can go to step 2.
In this step, we should send phone number to Instagram, that Instagram will send verification code to our phone number.
var singUpSmsCode = await InstaApi.SendSignUpSmsCodeAsync(phoneNumber);
if you passed step 2(with singUpSmsCode.Succeeded
), you can go to step 3.
In this step, you should send that verification code we received to Instagram.
var verify = await InstaApi.VerifySignUpSmsCodeAsync(phoneNumber, verificationCode);
if you passed this step(with verify.Succeeded && verify.Value.Verified
), you can complete your sign up with step 4.
In this step you should send all your information to Instagram. (Phone number, verification code, username, password, first name)
var create = await InstaApi.ValidateNewAccountWithPhoneNumberAsync(phoneNumber, verificationCode, username, password, firstName);
if you want to check that your account is created, you should check this properties:
if (create.Succeeded && create.Value.AccountCreated)
With two step you can create new account with an email address.
Note: for example this is our credential and information:
var email = "[email protected]";
var username = "rmt4006";
var password = "rmt12345678";
var firstName = "Ramtin";
First you should check email availability:
var checkEmail = await InstaApi.CheckEmailAsync(email);
if you passed this step(with checkEmail.Succeeded && checkEmail.Value.Available
), you can go to step 2.
In this step we create our user:
var create = await InstaApi.CreateNewAccountAsync(username, password, email, firstName);
Note: in older version, name of this functions is: InstaApi.CreateNewAccount
.
if you want to check that your account is created, you should check this properties:
if (create.Succeeded && create.Value.AccountCreated)
Iranian Developers (c) 2021 | Bahar 1400