-
-
Notifications
You must be signed in to change notification settings - Fork 377
Cannot make Admin API post request from proxy route #56
Comments
Please excuse me as this perhaps doesn't relate directly to this library. I guess I'm just trying to understand if the library is supposed to allow this use case. I did managed to make a post request to As apparently there were others with similar questions: I wonder if this is something you could shed some light on it. Thank you! |
Ah from a Proxy route?
This doesn't get set for proxy... I think I'll mark this as a bug as there no support/code for setting the shop session from proxy which would solve the issue of why you get the null error. |
@ohmybrew yeah, sorry, I should have made that clearer. This is from indeed from a proxy route. |
@ohmybrew I'm currently running 2.3 |
Mm ok ill backport the fix.
…On Tue, Jul 24, 2018 at 2:07 PM Luis Martins ***@***.***> wrote:
@ohmybrew <https://github.com/ohmybrew> I'm currently running 2.3
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACTuOtznMi8py7v9GvBAXj9Moh_-j6YUks5uJ01RgaJpZM4VYEkN>
.
--
Thanks,
Tyler King
|
Oh, I can upgrade this to the latest if it helps |
No, no. It's a breaking release to go to 3.0. So no worries, I'll back port
it into v2.
On Jul 24, 2018 2:26 PM, "Luis Martins" <notifications@github.com> wrote:
Oh, I can upgrade this to the latest if it helps
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACTuOt0azyGeSHVa2uhro9sVH9QinZA4ks5uJ1GmgaJpZM4VYEkN>
.
|
This should be solved now. Tagged v3.0.1 for currents. You should be able to tell composer to pull v2.3.2 to grab the fix. |
Hi @ohmybrew sorry I got carried away with my work and forgot to confirm this. It does solve it! :) Thanks so much for your help and this awesome library Tyler! |
I'm building an app that exposes a frontend on the public that feeds from proxy routes to pull data from the store.
This is a product builder, which at the end of the process should make a proxy request, which in turn has a controller method to create a new product in Shopify using the REST API routes.
I've tried two approaches, both resulting in different server errors.
Using the examples from the documentation, I've tried to instantiate a
ShopifyApp
object as follows:This results in the following error message:
With null referring to the
$shop
instance.So I've tried a different approach, where I would instantiate from the
BasicShopifyAPI
class instead, passing the necessary credentials:In this case I get a different error message:
I've double checked the env credential variables and they are accurate.
My guess this is because the proxy routes do not use the
auth.shop
middleware, so I wonder what could be done to get around this and make this request succeed.Thanks so much for any help.
The text was updated successfully, but these errors were encountered: