Comments (7)
for me, Calling API with HTTPS, but the return result for next href is HTTP. Same issue as #169
"_links": {
"self": {
"href": "http://URL/api/rest/v1/products***"
},
"first": {
"href": "http://URL/api/rest/v1/products***"
},
"next": {
"href": "http://URL/api/rest/v1/products***&search_after=74812"
}
},
After API returns HTTPS, the issue is solved.
Hope could help someone
from api-php-client.
the apiClient is initially built with:
/**
* Returns the API Client for a given tenant
* @param string $tenant
* @return AkeneoPimClientInterface
*/
public function getApiClient(string $tenant){
$settings = $this->getCredentials($tenant);
$clientBuilder = new AkeneoPimClientBuilder($settings['baseUri']);
return $clientBuilder->buildAuthenticatedByPassword($settings['client_id'], $settings['secret'], $settings['apiUser'], $settings['apiUserPassword']);
}
The API user role has the following permissions:
and after playing around I assume that somehow the api token refresh does not work for the subsequent api calls...
any help / suggestions are really appreciated because this issue is really bad for us :-/
from api-php-client.
hi guys, I think I found a clue to my issue.
My setup: docker + traefik
the described error occurs only if I access the API via traefik. the first request is ok but the subsequents will fail.
If I expose the httpd container directly then the API everything works just fine.
so my question: has anybody a working traefik (v2) configuration that works with the api too? currently I am using the following configuration:
labels:
# Traefik configuration, Hostname needs to be changed
- traefik.enable=true
- traefik.http.routers.pim-acme-http.rule=Host(`pim.acme.com`)
- traefik.http.routers.pim-acme-http.entrypoints=http
- traefik.http.routers.pim-acme-http.middlewares=redirect
- traefik.http.routers.pim-acme-https.rule=Host(`pim.acme.com`)
- traefik.http.routers.pim-acme-https.entrypoints=https
- traefik.http.routers.pim-acme-https.tls=true
- traefik.http.routers.pim-acme-https.tls.certresolver=letsencrypt
- traefik.http.middlewares.redirect.redirectscheme.scheme=https
from api-php-client.
Hello wucherpfennig
I also encountered the same problem, but I am using nginx + docker, do you have any good solutions?
from api-php-client.
Yes but it is definitively a hack: In addition expose the whole service on a custom port and make all the api calls with IP + Port... It works but 💩 I would very much appreciate if you would find a better solution 😉
from api-php-client.
Thanks guys, I've solved it with Calling API using GuzzleHttp, but please note that it may have a timeout problem.
from api-php-client.
for me, Calling API with HTTPS, but the return result for next href is HTTP. Same issue as #169
"_links": { "self": { "href": "http://URL/api/rest/v1/products***" }, "first": { "href": "http://URL/api/rest/v1/products***" }, "next": { "href": "http://URL/api/rest/v1/products***&search_after=74812" } },
After API returns HTTPS, the issue is solved. Hope could help someone
Just saw your comment. Works! Thank you
from api-php-client.
Related Issues (20)
- PHP 8.1 Deprecations HOT 1
- Add [\ReturnTypeWillChange] attribute to current and key methods in ResourceCursor class HOT 1
- Filter products for a single vendor
- symfony/options-resolver is used in src/Client/Options.php but it is only dev requirement through another package HOT 1
- auto switch to http from https with error HOT 4
- Unexpected exception when instantiating class - error in Symfony 5.4 and PHP 8.1 HOT 1
- Filters doesn't work for categories. HOT 2
- api-php-client calls undefined function in pim HOT 3
- IN operator not working for assets
- upsertList not working on Windows HOT 1
- Filters doesn't work for categories
- $client->getCategoryApi()->all() returns empty parent and position values for all
- Set a timeout when sending requests to Akeneo
- Random Server Side errors on random products
- Missing getter for private totalIndex
- Not able for get table attribute select options
- psr/http-message Current Version Issue HOT 8
- Support for symfony 7.0 HOT 1
- Suggested package php-http/guzzle6-adapter is deprecated
- Assets interface on new client not available? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-php-client.