PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.32k stars 5.27k forks source link

Gorgias New Customer Actions #2842

Closed andrewjschuang closed 1 year ago

andrewjschuang commented 2 years ago

Gorgias New Customer Actions

Resolves #2838

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
pipedream-docs ✅ Ready (Inspect) Visit Preview May 24, 2022 at 7:09PM (UTC)
pipedream-docs-redirect-do-not-edit ✅ Ready (Inspect) Visit Preview May 24, 2022 at 7:09PM (UTC)
dylburger commented 2 years ago

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

andrewjschuang commented 2 years ago

Just one suggestion about extra slashes and a question:

I see Gorgias offers 2 methods of authentication. https://developers.gorgias.com/reference/authentication

The gorgias components authenticate by the api_key. Shouldn't the gorgias_oauth components use oauth authentication?

@michelle0927 yeah, I just copied and pasted the api_key because I couldn't authenticate via OAuth.

When I try to connect a Gorgias account this happens:

Screen Shot 2022-05-13 at 9 31 41 AM

When I copy the link and supply a nonce (random string) this then I can get to this page:

Screen Shot 2022-05-13 at 9 32 15 AM

But then later this happens:

Screen Shot 2022-05-13 at 9 32 30 AM

The id above is f4293f2c10f54747827d6cc8cfa502ce

I think we could continue to QA with api_key then after fixing this issue test the OAuth components, especially since they are using the same base.

@dannyroosevelt can you help us here?

dannyroosevelt commented 2 years ago

f4293f2c10f54747827d6cc8cfa502ce

Thanks for flagging the OAuth issues @andrewjschuang -- I fixed the issues you encountered, so you should be unblocked there.

And thanks for flagging both of the auth mechanisms, @michelle0927 -- yes we should definitely support all components for both apps, please.

andrewjschuang commented 2 years ago

@dannyroosevelt Thanks, was able to connect my account to Gorgias now. I tried to create a ticket, and it looks like I don't have sufficient scope permission. This is the error returned to me:

{"error":{"msg":"You do not have enough permissions to perform this action. Please contact an administrator of your company if you need them."}}

dannyroosevelt commented 2 years ago

@dannyroosevelt Thanks, was able to connect my account to Gorgias now. I tried to create a ticket, and it looks like I don't have sufficient scope permission. This is the error returned to me:

{"error":{"msg":"You do not have enough permissions to perform this action. Please contact an administrator of your company if you need them."}}

I don't think this is a scopes issue actually: https://developers.gorgias.com/docs/oauth2-scopes

Are you maybe using a non-admin acct or something?

andrewjschuang commented 1 year ago

@dannyroosevelt Thanks, was able to connect my account to Gorgias now. I tried to create a ticket, and it looks like I don't have sufficient scope permission. This is the error returned to me: {"error":{"msg":"You do not have enough permissions to perform this action. Please contact an administrator of your company if you need them."}}

I don't think this is a scopes issue actually: https://developers.gorgias.com/docs/oauth2-scopes

Are you maybe using a non-admin acct or something?

@dannyroosevelt Ohh, right. It's because my free trial expired.

@michelle0927 I think both of your requested changes are fixed now, could you please check?

michelle0927 commented 1 year ago

@andrewjschuang It looks like the components in gorgias_oauth are still using the api key authentication. I don't think gorgias_oauth.app.js is being imported anywhere. Take a look at how the separate authentication methods are set up for docusign & docusign_developer or for brex & brex_staging. https://github.com/PipedreamHQ/pipedream/tree/master/components/docusign_developer https://github.com/PipedreamHQ/pipedream/tree/master/components/brex_staging

DilanAthukorala commented 1 year ago

@andrewjschuang gorgias_auth list_tickets action 'limit' prop is not functioning. image


And for create_ticket, create_ticket_message, ticket_update event sources I can see all events are returned without filtration

image

andrewjschuang commented 1 year ago

@DilanAthukorala thanks for noting. Fixed both issues.

DilanAthukorala commented 1 year ago

Verification completed.

andrewjschuang commented 1 year ago

/approve

andrewjschuang commented 1 year ago

/approve

andrewjschuang commented 1 year ago

@vellames-turing can you also dismiss @michelle0927 requested changes?

vellames commented 1 year ago

Looks like we have some Lint problem

andrewjschuang commented 1 year ago

Had to rerun the job, thanks