Closed robbelDev closed 1 year ago
Hello, I think I have the same issue. I am testing my app in the Shopware account test environment and have one problem. Every API call from the external server to the shopware returns 302 instead 200. This problem DID NOT occur on different servers when I tested my app. Also, I tested these API calls by Postman and everything works but by Postman I am using a bearer token. It looks like that connection by integrations returns 302. Can someone help me with this? or give some idea what can be the problem?
Is there any chance to help us?
Thanks for bringing this up again.
I guess the problem is the configuration of the test environments: The shop-url
in the registration request does not contain the path /shop/public/
.
Could you please verify that the shop-url
in your app server contains the full path?
I see two options to solve this (both on Shopware's side):
APP_URL
of the test environments to incorporate the subdirectory /shop/public/
@Christian-Rades FYI 🙂
After receiving some more feedback from @coditive-marcin-p (thanks for that! 💙), the problem was that they used an absolute path /api/system-config
(with a leading slash). Since the base_uri
of the Guzzle client is configured to have a trailing slash, a relative path (i.e. api/system-config
) must be used to solve the issue. This will also work for shops not being served from a subfolder.
I know it's been a while since you opened this issue @robbelDev and in your code snippet, you're already using a relative path. Were you able to find a solution in the meantime or does the issue still persist?
@robbelDev I just saw that your base_uri
is using http://
instead of https://
- I guess this is the reason for the redirect 😅
I'll consider this case closed. If the problem persists, feel free to reopen
Hi everybody,
when trying to authenticate with the Shopware 6 app test environment to send a request to the Shopware instance, the core code throws an exception. This is thrown by a 302 Http status code:
The calling code:
Thanks for looking at