Missing Account ID field in Webhook payloads

Still need help?

The Atlassian Community is here for you.

Ask the community

 

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

   

Summary

Users receive the following error message related to the Webhook's payload while integrating Bitbucket Cloud with third-party applications.

{"message":"Invalid Webhook request received: Missing 'actor account id' field"}

Cause

This issue happens because the integration depends on the Webhook payload including the actor of the push along with its Atlassian Account ID. However, this information is not included in the payload, hence the error.

This happens when users add SSH Keys to the workspace's settings, in order to have a key with read/write access to all repositories.

This setting should allow users to push, however, since the Key is not added to any personal account, it can't be traced back to an e-mail and an Atlassian Account ID, therefore, the author field within the payload will contain information related to the workspace in which the Key is added, instead of the pusher's account information.

Here's an example of the same Webhook payload when a push was made using:

  • An SSH Key that was added to the workspace's settings:

    "actor": {
        "username": "<username>",
        "display_name": "<display_name>",
        "type": "team",
        "uuid": "<uuid>",
        "links": {
          "self": {
            "href": "https://api.bitbucket.org/2.0/workspaces/<uuid>"
          },
          "html": {
            "href": "https://bitbucket.org/<uuid>/"
          },
          "avatar": {
            "href": "https://bitbucket.org/account/<username>/avatar/"
          }
        }
      }
  • An SSH Key that was added to the personal settings:

    "actor": {
        "display_name": "John Doe",
        "uuid": "<uuid>",
        "links": {
          "self": {
            "href": "https://api.bitbucket.org/2.0/users/<uuid>"
          },
          "html": {
            "href": "https://bitbucket.org/<uuid>/"
          },
          "avatar": {
            "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/5e8d952d5f62040b81201c72/a385f5c2-3d6e-4f14-b446-0683d8bdf399/128"
          }
        },
        "type": "user",
        "nickname": "John Doe",
        "account_id": "<account_id>"
      }

Solution

In order to fix this issue, users will need to remove their SSH keys from the workspace's settings and add them to their personal settings. This can be achieved by following these steps:

  1. Navigate to your workspace's settings;
  2. Under Security, click on SSH Keys;
  3. Locate the Key that's being used for push and click on the (error) icon to remove it;
  4. Add the Key to your personal settings.



Last modified on Dec 1, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.