Description
Preconditions and environment
Magento version: 2.4.* ( Tested on 2.4.3, 2.4.4 and 2.4.6)
On Magento 2.3.5 I was able to do POST /V1/carts/mine / POST /V1/carts/mine/items OR PUT V1/guest-carts/{cartId} with Intergation tokens, but on Magento 2.4.* it doesn't work.
Steps to reproduce
-
In admin under System>Extensions>Integrations create a new integration
-
Do POST /rest/default/V1/carts with Auth. type OAuth 1.0, Signature Method HMAC-SHA256 and enter the Integration keys and tokens there. As a result, quote id value will be generated;
-
Do POST /rest/default/V1/carts/mine/items with the same Auth. and with body (add the quote_id that was created with the previous request):
{
"cartItem": {
"sku": "{sku}",
"qty": 1,
"quote_id": {quote_id}
}
}
- Do POST rest/default/V1/guest-carts with the same Auth. type to get customer quote id.
- Do PUT rest/default/V1/guest-carts/{cart_id} with the same Auth. and body
{
"customerId": {customer_id},
"storeId": 0
}
Expected result
- POST /rest/default/V1/carts/mine/items - item gets added to the cart
- PUT rest/default/V1/guest-carts/{cart_id} - the customer has been assigned to the specified cart
Actual result
POST /V1/carts/mine / V1/carts/mine/items:
{
"message": "\"%fieldName\" is required. Enter and try again.",
"parameters": {
"fieldName": "customerId"
}
}
PUT V1/guest-carts/{cartId} :
{
"message": "You don't have the correct permissions to assign the customer to the cart."
}
Additional information
I'm investigating this, because the third party needs these requests to work with the integration token the same way as on the old setup (2.3.5).
In admin under System>Extensions>Integrations I have created an integration:
- Callback URL is empty;
- Identity link URL is empty;
- Resource Access is All
In admin Stores>Configurations>Services>OAuth>Consumer Settings "Allow OAuth Access Tokens to be used as standalone Bearer tokens" is set to Yes. Expiration Period is set to 30000.
Proposed solution
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status