8 – 403 Error – Unable to create Paragraphs via REST with ?_format=hal_json

Trying to add paragraphs via REST to the earlier created node.

I’ve installed the Paragraphs Type Permissions module, enabled the following permissions for my REST user’s role

  • Text: Create content
  • Video: Create content

See: https://www.drupal.org/project/paragraphs/issues/3012600#comment-12851834

but still getting an error 403 and {“message”:””} in response while trying to add some paragraphs to the node created earlier.

Error log:

Type        access denied
Date        Monday, December 28, 2020 - 20:40
User        restadmin
Location    https://drupal-8.site/entity/paragraph?_format=hal_json
Referrer    
Message     Path: /entity/paragraph?_format=hal_json. SymfonyComponentHttpKernelExceptionAccessDeniedHttpException: in DrupalCoreRoutingAccessAwareRouter->checkAccess() (line 120 of /var/www/core/lib/Drupal/Core/Routing/AccessAwareRouter.php).
Severity    Warning
Hostname    77.139.170.139
Operations

Here JSON for the Text Paragraph:

   {
        "field_text": (
            {
                "value": text,
                "format": "full_html",
                "processed": text
            }
        ),
        "parent_id": (
            {
                "value": str(parent_id)
            }
        ),
        "parent_type": (
            {
                "value": "node"
            }
        ),
        "parent_field_name": (
            {
                "value": "field_paragraphs"
            }
        ),
        "type": (
            {
                "target_id": "text"
            }
        ),
        "_links": {
            "type": {
                "href": base_url + REST_TYPE_PARAGRAPH_TEXT
            }
        }
    }

Here JSON for the Video paragraph:

{
        "field_video": {
            "value": "video:" + str(video_id)
        },
        "parent_id": (
            {
                "value": str(parent_id)
            }
        ),
        "parent_type": (
            {
                "value": "node"
            }
        ),
        "parent_field_name": (
            {
                "value": "field_paragraphs"
            }
        ),
        "type": (
            {
                "target_id": "video"
            }
        ),
        "_links": {
            "type": {
                "href": base_url + REST_TYPE_PARAGRAPH_VIDEO
            }
        }
    }

What permission am I missing here?