How an agency connects a client’s Instagram without the password

The OAuth flow Meta documents for agencies to reach a client’s Instagram messages without a password: login, code, token, App Review and Unified Login.

An agency does not need the client’s Instagram password, and should never ask for it. Meta documents an authorization flow instead: the client clicks a login link, signs in to their own account in a Meta window, approves the permissions, and your app receives a code. The code becomes a token, and the token is what grants access to messages. The password never reaches the agency. This article walks through that flow with Instagram Login, what Meta requires before it works for third-party accounts, and where Unified Login fits.

What flow replaces the password?

Business Login for Instagram. It starts from an embed URL that you set up in the App Dashboard with the permissions you are requesting. The client opens that URL, logs in to Instagram and grants access. Meta then redirects the browser to your redirect_uri with an authorization code.

  • Authorization: login runs at https://www.instagram.com/oauth/authorize and returns a code to your redirect_uri.
  • Code exchange: the code is exchanged for a short-lived token at https://api.instagram.com/oauth/access_token.
  • Long-lived token: the short-lived token lasts 1 hour and is exchanged for one that lasts 60 days.
  • Refresh: a long-lived token can be refreshed before it expires, and each refresh is valid for 60 days from the day it happens.

The authorization code is valid for 1 hour and works only once. Exchange it as soon as the callback arrives, and do it on your server: the long-lived exchange carries your app secret, and Meta says that call should only be made in server-side code.

# Exchange the short-lived token (1 hour) for a long-lived one (60 days). # Server only: the call carries the Instagram app secret. GET https://graph.instagram.com/access_token ?grant_type=ig_exchange_token &client_secret=<INSTAGRAM_APP_SECRET> &access_token=<SHORT_LIVED_TOKEN> # Part of the response, as in Meta's example { "access_token": "<LONG_LIVED_TOKEN>", "expires_in": 5184000 }

expires_in is in seconds: 5184000 in Meta’s example, which is 60 days. Store the expiry date next to each client’s token. A token that is not refreshed within 60 days expires and can no longer be refreshed, and the client has to log in again. The details are in the article on the 60-day token.

What breaks the login on the first try?

Three details account for many failed first connections, and all three are in the Business Login documentation.

  • An exact redirect_uri: the value you send must exactly match one of the valid OAuth redirect URIs listed in the App Dashboard. Any difference between the two counts.
  • The right app credentials: Instagram Login uses the Instagram app ID and app secret shown under Instagram > API setup with Instagram login in the dashboard. They are not the same as your Meta app ID.
  • The right account: with force_reauth=true in the login URL, Meta makes the person sign in with the professional account’s credentials, even if another Instagram session is open in the browser. The parameter has been documented since June 14, 2025.

That last point matters to agencies. People who run several accounts usually have more than one session open, and a login without force_reauth tends to continue with whichever session is active. With the parameter, the client types the credentials of the account they actually want to connect, which lowers the odds of authorizing the wrong one.

What happens if the client declines?

Meta returns to your redirect_uri without a code and with two error parameters: error=access_denied and error_reason=user_denied. Handle it as a normal state of the flow, not as a server error: tell the client what is missing and offer the link again.

# The client cancelled in the Meta window: the callback looks like this https://your-domain.example/callback?error=access_denied&error_reason=user_denied

Two other common blocks only show up after login. If the client’s account is a personal one, the API returns error #10, saying the account type is not business or creator; the fix is for the client to switch to a professional account and connect again. If the client turned off Allow access to messages in the Instagram app, messaging calls fail with error #200. The professional account article covers both cases.

Why does the link work for your account but not your client’s?

Access levels. Permissions with Standard Access can only be requested from app users who have a role on the app. That is what lets you test with your own accounts before any review. To serve third-party accounts, such as an agency’s clients, Meta requires Advanced Access, which depends on App Review and Business Verification.

SituationAccess levelWhat Meta asks for
Only your own professional account or one you manageStandardNo review; only users with a role on the app
Client accounts (third parties)AdvancedApp Review and Business Verification
Tech Provider serving multiple businessesAdvancedApp Review required

During development, testers come in through app roles. According to the app roles page, most apps can have up to 50 testers; with a verified business the cap rises to 500, counting analysts and testers together. That is for testing, not for serving your client base.

In review, each permission needs a usage description and a screencast of the end-to-end experience. For some permissions, your app must have made at least 1 successful API call before you can request Advanced Access. For messaging with Instagram Login, the permissions are instagram_business_basic and instagram_business_manage_messages; the walkthrough is in the App Review article. The old scope values, such as business_basic and business_manage_messages, were deprecated on January 27, 2025.

Business Verification also comes in another way: when other businesses use your app, it must be connected to a business that completed Business Verification. Since February 1, 2023, Meta has warned that apps requesting Advanced Access may need to be connected to a verified business. For an agency, that means verifying its own business before opening the review.

Does the token unlock everything in the client’s account?

No. A permission only grants access to data created by the app user who granted it, and the token only carries the permissions that were approved. Messages and comments are separate: moderating comments uses instagram_business_manage_comments on top of instagram_business_basic. Ask only for what your product uses. Every extra permission means another usage description, another screencast in review and another consent line the client has to understand.

Does Unified Login change anything for agencies?

Yes, and it is worth weighing before you build. Meta now lists three Instagram API setups: Unified Login, Instagram Login and Facebook Login. Unified Login is recommended for new integrations, and new Instagram API features ship only for it. Instagram Login is still documented, and the migration page says no retirement date has been announced for the existing setups.

  • With Unified Login, the client picks the business portfolio and the Instagram account, and the app must be owned by a business portfolio.
  • The client can sign in with Instagram or with Facebook.
  • The token belongs to the client’s business portfolio and keeps working if the person who connected it leaves the business.
  • Whether the token expires depends on the configuration you create in the dashboard.
  • The messaging permission is instagram_manage_messages, not instagram_business_manage_messages.

The third point solves a classic agency headache: the connection made by a client employee who later leaves. Also note that, per the App Review page, an app uses either Facebook Login or Instagram Login, never both. The full comparison is in the article on the three login setups.

How CRPRO Hub will handle this (coming soon): the client will connect a professional account through Instagram Login, with no password, from a connection link, and each account will take one channel slot in the plan. DMs will use the same endpoint and the same webhooks as WhatsApp numbers, with the contact writing first and replies inside the 24-hour window. Comments, publishing and insights are out of scope. See the Instagram page.

Frequently asked questions

Does the agency need the client’s Instagram password?

No. The client grants access in a Meta login window, and the app receives a code that becomes a token. The password stays with the client.

How long is the authorization code valid?

1 hour, and it can only be used once. Exchange it for a token as soon as the callback arrives.

Can I connect clients without App Review?

Only accounts of users who have a role on the app, such as testers. For third-party accounts, Meta requires Advanced Access, which depends on App Review and Business Verification.

What does error_reason=user_denied mean?

The client declined authorization in the Meta window. The callback comes with error=access_denied and no code; offer the link again.

Fontes

Documentação oficial da Meta, conferida em 8 de novembro de 2026.