{% extends "layouts/workspace_settings.html" %} {% load common_extras %} {% comment %} Connect an Instagram account. Same shape as telegram_connect.html — see the note there for why content_wrap is cleared and why the platform key is written once. Credential-free: the operator never pastes anything, so the "form" is one button that POSTs and redirects to Meta. The POST stays a real
because assert_page_permits_its_redirect checks this page's own form-action policy against the 302 it answers with. Restyled only. Every sentence here is the one that was on the page before — the env var names and Meta's own UI labels are what somebody follows along with in another tab, so none of them is a detail to tidy away. {% endcomment %} {% block title %}Connect Instagram · DemandTrail Messaging{% endblock %} {% block content_wrap %}{% endblock %} {% block content %} {% with platform_key="instagram" %}
{% include "partials/_platform_icon.html" with platform=platform_key size="lg" only %}

Connect an Instagram account

DemandTrail Messaging uses the Instagram API with Instagram Login, so the account you connect must be a professional account, Business or Creator. You will be sent to Instagram to authorise it, and we never see your password.

{% if error %}
{{ error }}
{% endif %}

Before you start

  1. Create a Meta app with the Instagram product added.
  2. Add this deployment's callback URL to the app's Business login settings, exactly as written.
    {% include "partials/_copy_field.html" with label="Callback URL" value=callback_url only %}
  3. Set the app's Instagram app ID and secret on this deployment as PLATFORM_INSTAGRAM_CLIENT_ID and PLATFORM_INSTAGRAM_CLIENT_SECRET.
  4. In the account's Instagram settings, allow access to messages.
{% csrf_token %}

Authorise the account

You will be sent to Instagram to sign in and pick the account.

What we ask Instagram for

    {% for scope in scopes %}
  • {{ scope }}
  • {% endfor %}

Reading and answering comments needs the last one, so it is requested up front rather than when a comment trigger is first used.

Back to channels
{% endwith %} {% endblock %}