Hello. I am trying to initiate a Shopify Source Oa...
# airbyte-api
j
Hello. I am trying to initiate a Shopify Source Oauth. However I am getting a 400 error.
Copy code
{'type': '<https://zalando.github.io/problem/constraint-violation>',
 'status': 400,
 'violations': [{'field': 'initiateOAuth.initiateOauthRequest.name',
   'message': 'must not be null'}],
 'title': 'Constraint Violation'}
I am running the below python function in a Jupyter notebook. Anything I am doing wrong? Thanks!
j
Hey Jaafar, we had a planned change to move to use the “sourceType” field in the payload, but currently it’s actually still “name” which is contrary to the documentation which got updated early. Can you update your request to replace “sourceType” with “name” for now?
j
Thanks @Jon Tan (Airbyte). I thought so, because I had change it for GA4 and I am able to make it work for GA4. When using name instead of sourceType for shopify, I still get an error but a different one as you can see below
Copy code
{'type': '<https://reference.airbyte.com/reference/errors#invalid-consent-url>',
 'title': 'invalid-consent-url',
 'status': 500,
 'detail': 'Unexpected problem generating consent URL: OAuth state could not be found.'}
@Jon Tan (Airbyte) When do you think you would be able to help me with this issue? Shopify is quite an important source for me. thanks
@Bryce Groff (Airbyte): Maybe you can help on this?
j
@Jaafar I actually don’t think we support Shopify OAuth through the API today, our OAuth support for Shopify via the standard OAuth flow is (I believe) fairly new. I also have some recollection that their client ID redirect URLs may be set up in such a way that we can’t support the full OAuth flow today. We have a number of OAuth connectors that fall into this bucket and the work needed to resolve the technical limitations on our end has not yet ended up on any roadmaps so not sure what timelines may look like
j
Hi Jon, thanks for the prompt reply. Good to know! I suggest you update the documentation so other people don’t spend hours like me trying to debug the error they receive 🙂
Moreover, does it mean that if I want to use the shopify source via the API, I need to create “Workspace OAuth Credentials Override” ? so I guess this means creating Apps for all sources I would like to add to that workspace?
j
Yup, will make a note to update the documentation, thanks for the feedback! With regards to using your own shopify creds via the API, you would indeed need to create a Workspace OAuth Credential Override and would also need to have a mechanism through which you could send a user through OAuth. The expectation would be that you would use your credentials to fetch the tokens and then would submit a credential override and create the source with the appropriate tokens present. It should theoretically be possible to send a user through OAuth for a source via the API with a workspace credential override using your app so long as the Airbyte redirect URL is set as the redirect URL for your app, but I don’t know if there’s anything that would prevent setting that as your redirect URL and have not tested that flow specifically for shopify so just want to make sure you’re aware that there may be limitations.
b
@Jon Tan (Airbyte) I just hit this exact same issue with your documentation apparently 22 days after it was first reported. You guys really need to either update your docs or your code. I'm losing trust in this product.