Skip to content

Receiving error: Response to incorrectly signed payload not 401 even though I am returning 401  #243

@saqib1324

Description

@saqib1324

Hi, I am trying to integrate webhooks with Ruby on Rails.
These are my logs
Screenshot 2022-12-08 at 1 11 17 PM

So as it can be seen, I am returning 200 for matching requests and 401 for not matching requests but still on Xero side, it says, Intent to receive is required and Response to incorrectly signed payload not 401.

My ruby code for returning statuses is this:

def xero_webhooks
    response = Xero::WebhookManager.call({
      read_body_request: request.body.read,
      request: request,
      params: params
    })
    if response.success?
      head :ok
    else
      head :unauthorized
    end
  end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions