Sign Up With Instagram
Instagram OAuth enables users to sign in to Apps using their Instagram account through OAuth.
To complete this tutorial, you will need:
- An app created at Back4App
- Set up a Subdomain for your Back4app app
First of all, itโs necessary to make sure that you have an existing app created at Back4App. However, if you are a new user, you can check this tutorial to learn how to create one.
Log into your Instagram Developer account and sign up as a Developer. Enter your website, telephone, and a description for your App. Accept the terms to proceed.
Go to Overview. Click on Register Your Application๏ปฟ
Click on Register a New Client๏ปฟ
Fill up the Application Name, Description, Company Name, Website URL, Redirect URIs, Privacy Policy URL, and Contact email.
For the Valid redirect URIs, if you are only trying to retrieve your access token, you can leave it as
Otherwise, you should use the production URI for redirection
At this point, you should have a Client like the image below
Click on Manage and under the Security tab, uncheck the Disable Implicit OAuth๏ปฟ
If you left your Redirect URIs as localhost, there are two ways you can retrieve your token. The first one is using your Browser of choice, and going to the following URL:
just change the CLIENT-ID and REDIRECT-URI using the values you got from your newly created Client. This will redirect you to an invalid page, but show you the access token in the URL:
The other way to retrieve such a token is to run the following CURL command, replacing the CLIENT-ID, CLIENT-SECRET, and REDIRECT-URI for your values:
That command will also output your Access Token.
Now that the Sign In with Instagram is configured, you can start the development process passing the Access Token you retrieved for authentication. The format for AUTHDATA is:
Here is the method for the iOS SDK:
And here for the Android SDK:
๏ปฟ