Generate Access Token for Personal Account
1. You have to log in to your Facebook account and then go to Facebook for Developers.
2. If you don’t have a developer account, click the Get Started button at the top. Skip to step 4 if you have a developer account.
3. Then you have to register for a developer account, and follow the steps to create your account.
4. Once done, you’ll get to the Apps page, and click on the Create App button.
5. On the next page you have to select if you want to connect the app with a business profile or not and then click on the Next button.
6. On the next page select Other and click Next.
7. On the next screen, you have to select your app type, select Consumer and click Next.
8. Then add an app name, email id and optionally connect your business account. Once done click on the Create App button, it will ask for your password to authenticate.
9. On the next page click the Set up button in the Instagram Basic Display.
10. On the next page click on the Create New App button.
11. In the popup you can add a new name to the app or you can use the existing one, then click on the Create app button.
12. On the next page scroll down and click on the Add or Remove Instagram Testers button.
13. On the next screen click on the Add People button.
14. In the popup select Instagram Tester then search for your or anyone’s Instagram username you want you want to set as a tester, select the username and click on the Add button.
15. Then you’ll see the Instagram username as an Instagram Tester and the status is set as pending. Click on the Apps and Websites link.
16. It will take you to that specific user’s Instagram account, (login to the account if not already logged in). Go to the Tester Invites tab and click on the Accept button.
17. Then come back to the Facebook Developers page where you were creating the app, from the left sidebar, click on Instagram Basic Display> Basic Display.
18. On the next page scroll down the User Token Generator section and click on the Generate Token button.
19. In the popup window click the Allow button and the popup will automatically close.
20. Then you’ll see the Token Generated popup, check the I understand checkbox to see the token, and click the Copy button to copy the token key.
Generate Access Token for Business Account
To generate access token for business account follow the process –
1. You have to log in to your Facebook account and then go to Facebook for Developers.
2. If you don’t have a developer account, click the Get Started button at the top. Skip to step 4 if you have a developer account.
3. Then you have to register for a developer account, and follow the steps to create your account.
4. Once done, you’ll get to the Apps page, click on the Create App button.
5. On the next page, select the business profile you want to link with the app and click Next.
6. On the next page select Other and click Next.
7. On the next screen, you have to select your app type, select Business and click Next.
8. Then add an app name, email id and optionally connect your business account. Once done click on the Create App button, it will ask for your password to authenticate.
9. On the next page, from the top menu go to Tools > Graph API Explorer.
10. On the next page, select your app from the Meta App dropdown.
11. Then from the User or Page dropdown select Get Page Access Token. A popup will open, continue with your Facebook account, then select your Facebook page and follow the steps to complete the process. Now you’ll see two permissions added in the Permissions tab.
12. Then add “pages_manage_metadata” permission in the Add a Permission field.
13. Similarly add the following permissions –
- ads_management
- business_management
- instagram_basic
- instagram_manage_comments
- instagram_manage_insights
- instagram_content_publish
Now you should have nine permissions in the Permissions tab. All the permissions in green color are not included yet.
14. To include them click on the Generate Access Token button, a popup will open, continue with your Facebook account, then select your associated business profile, Facebook page and Instagram profile then follow the steps to complete the process. Now you’ll see all permissions in black color.
15. Then from the User or Page dropdown select your Facebook page and then click on the Submit button. Now you’ll see your Facebook page name and ID.
16. Now copy and save the page ID in a notepad.
The access token generated here is a temporary one (will expire in about 2 hours) to extend the access token, follow steps 17-20 mentioned in the Facebook access token document.