Laravel

πŸ“Έ

Instagram messaging

Log in with a professional Instagram account (Business or Creator) to track DMs and set up automated replies.

Log in with Instagram

While your Meta app is in Development mode, only admins, developers, and invited Instagram testers can connect.

Testing checklist

End-to-end test: Account B (tester) sends a text DM to Account A (business connected in this app).

0. Developer β€” one-time setup
  • Meta β†’ Roles β†’ add Account B under Instagram Testers.
  • Meta β†’ Webhooks β†’ object Instagram β†’ Callback URL: https://insta.ufanisi.net/webhooks/instagram Verify token = META_WEBHOOK_VERIFY_TOKEN in .env β†’ subscribe messages + messaging_postbacks β†’ Verify and save.
  • For real DMs (not only β€œSend to My Server”): app Live + Advanced Access on instagram_business_manage_messages.
  • Keep running: php artisan serve, php artisan queue:work, and ngrok (URL must match APP_URL).
Account A β€” business / inbox owner
  • Account must be Business or Creator.
  • Open this link and tap Log in with Instagram as Account A: https://insta.ufanisi.net/login
  • Approve all permissions (especially instagram_business_manage_messages).
  • Complete onboarding until you reach Messages.
  • Open Starters β†’ review chips β†’ Push to Instagram.
  • On Account A’s phone (Instagram app): open Message requests β†’ Accept Account B’s chat if it appears there.
  • Wait for Account B’s message, then refresh Messages or run php artisan instagram:diagnose.
Account B β€” tester / sender
  • Developer adds Account B’s @username as Instagram Tester in Meta.
  • On B’s phone: Instagram β†’ Settings and privacy β†’ Website permissions β†’ accept invite for this app.
  • B should be Business or Creator when possible.
  • In Instagram on a phone (not desktop): open DM with Account A β€” look for suggestion chips above the composer.
  • Tap a chip or send plain text (e.g. Test from B).
  • Do not use a random account that isn’t a tester. B does not need to open this login page.
Verify it worked
  • tail -f storage/logs/laravel.log β†’ look for Instagram webhook received and stored inbound message.
  • Logged in as A β†’ Messages shows the new thread.
  • If dashboard test works but B’s DM does not β†’ check Live mode, webhook URL, and that B accepted the tester invite.

Meta: Instagram test accounts Β· Use Log out or incognito to switch accounts on this device.