Closed hjackbeem closed 4 years ago
I tried this code locally and get an error: [{'field': None, 'message': 'access forbidden'}]
when I try to sync campaigns.
I generated a token with unlimited access. Any thoughts?
Thanks for the quick reply! :) Not sure what's causing that, can you share the properties config you are using?
The only relevant item would be the api_key, I think? {"api_key": "SG..."}
.
I see the same error described in this issue, I'm just wondering if whether I could sync Campaigns after this PR is because of the PR or some other issue.
How are you running the tap? Is it something like tap-sendgrid -c config.json --properties properties.json
? And if so, what does the content of that properties.json
look like?
I'm afraid I'm also a little unclear about the errors you're getting. When you say you see the same error described, do you mean you get the "Insufficient authorization, missing for marketing_campaigns.read"
error when using the tap in the Stitch app, or when running the PR code locally?
I was running the tap similar to how it executes within Stitch. With no modifications, I saw the error this PR is fixing. "Insufficient authorization, missing for marketing_campaigns.read"
.
I figure that the old marketing_campaign.read permission was useful for reading the Campaign stream, so I selected that one and executed the tap with the code in this PR. What I'm ultimately wondering is whether there's an underlying issue with our test Sendgrid account (that we can't query Campaigns) or if that error is a side effect of this change?
As the author of the PR, were you able to read Campaign objects from Sendgrid with the changes here?
Looks like I was getting a false positive on my sync action. Looking into it, I think there is a deeper problem with Sendgrid's API permissions regarding Campaings. I have raised an issue with their support team and am waiting to hear back.
Hello all! Just popping on to confirm that new stitch integrations using this tap are failing due to the missing marketing_campaign.read
scope. It appears they have updated the API without updating the docs.
I merged and released this and have confirmed that it broke in other places. Reverting.
After talking to Sendgrid support about this, it seems the only way to add the marketing_campaign.read
scope is by raising a support ticket. They added the scope for me and after that this tap worked correctly, without any of the modification I suggested.
So this tap will be broken for any new Sendgrid users, because they can't pass the permission check without requesting support to add the undocumented permission, but they only need that permission if they want to have access to legacy campaigns.
I'm still very new to the Singer ecosystem so I'm not sure what the best way to handle this scenario. Should "Legacy Campaign" support be a configurable option? Or would it make more sense to have a separate "Sendgrid Legacy Campaigns" tap?
I've been attempting to resolve #6
Per the comment above, I asked for marketing_campaign.read
to be added - SendGrid support replied:
The [
marketing_campaigns.read
] scope you are referencing is a legacy Marketing Campaigns scope. The Legacy Marketing Campaigns feature is no longer available, unfortunately. As such, I wouldn't be able to add that scope on your behalf.
Why was this PR reverted in #5?
Description
Trying to configure this tap in Stitch yields the following error:
It appears that
marketing_campaigns.read
is no longer a supported permission for the Sendgrid API, which instead exposesmarketing.read
andmarketing.automation.read
. It is worth noting that the Sendgrid docs erroneously still listmarketing_campaings.read
as viable permission.Type of change
marketing_campaigns.read
has been removed fromscopes
instreams.py
and replaced withmarketing.read
andmarketing.automation.read
.