Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gmail Pub/Sub API Integration for Real-Time Email Notifications in Laravel #285

Open
umarzahid028 opened this issue Oct 4, 2024 · 0 comments

Comments

@umarzahid028
Copy link

umarzahid028 commented Oct 4, 2024

Hey

I'm encountering an issue. I've set up topics and subscriptions, and everything works fine when I test internally. However, when I use the watch method in Laravel, I get the following error:

{
    "error": {
        "code": 403,
        "message": "Error sending test message to Cloud PubSub projects/test111/topics/gmail : User not authorized to perform this action.",
        "errors": [
            {
                "message": "Error sending test message to Cloud PubSub projects/test111/topics/gmail : User not authorized to perform this action.",
                "domain": "global",
                "reason": "forbidden"
            }
        ],
        "status": "PERMISSION_DENIED"
    }
}

My main goal is to receive emails in real-time when they arrive in the Gmail inbox. Previously, I used a cron job, which worked fine, but now I plan to use the Pub/Sub API for instant notifications. Has anyone implemented something similar? If so, could you guide me on how to achieve this setup?

Thanks
Umar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant