Question:
I have a interesting error.
I’m trying query wix store products via api, but when i try new created wix site api returns “Bad Message 431 reason: Request Header Fields Too Large” error but when i try with some old wix site api works well.
When check two access tokens ;
Newly created sites access token longer then old ones so curl and postman return 431 in newly created site apis.
How can solve this?
Product:
Wix Store Api
Anybody will be able to help you, since you do not provide any information about your written code.
I’m trying with postman and i changed access tokens for security reasons.
I’m taking access token both of https://www.wixapis.com/oauth/access with refresh token.
Sharing both of request in below ;
1-) New site request return 431 because access token is so long
curl --location 'https://www.wixapis.com/stores/v1/products/query' \
--header 'Authorization: OAUTH2.TOKEN' \
--header 'Content-Type: application/json' \
--header 'Cookie: XSRF-TOKEN=TOKEN' \
--data '{"includeVariants":true}'
2-) Old site same request but access token is not long so request return 200 ok
curl --location 'https://www.wixapis.com/stores/v1/products/query' \
--header 'Authorization: OAUTH2.TOKEN' \
--header 'Content-Type: application/json' \
--header 'Cookie: XSRF-TOKEN=TOKEN' \
--data '{"includeVariants":true}'
Seems like the interest got lost here…
Edited this post because it was sharing tokens that are sensitive and shouldn’t be shared.
1 Like
Did not see it, so waiting for second try.
Thanks for info!
Oh, the CODE already arrived → i was not expecting CURL-CODE.
Maybe i am useless in this case.
Maybe Anthony can help more in this case.
Thank you for help,
In Nutshell we have two wix site one is new other is old, when take a access token with old site access token shorter then new one, when we make a request with new ones access token wix response 431.
Really interesting, i cant understand.
Can you share the command you are running to retrieve this code? Make sure to use placeholders in place of sensitive information.
Also can you link me to the dashboard for your app? The url would look something like this: https://dev.wix.com/dc3/my-apps/61cea27c-9414-42f2-bddd-0698c058d877/dashboard
Actually, please reach out to the support team for this here: https://devforum.wix.com/kb/en/contact
They’ll be able to assist you.
Thanks for help, i opened a ticket.
1 Like
We reach out support team and they return ;
"If you added permissions before this store installed so it makes sense Stores before it was working and this one is not.
Anyway, we have a limit to amount of permissions we handle on one token. It seems you have “Manage Stores - all permissions” which includes all permissions you added after it. So try and remove permissions and reinstall.
We are working on expanding the Auth header but this case is just overflowing the permissions without the need of all."
We solve this issue with select only needed permissions and everything ok for now.