You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to integrate webhooks with Ruby on Rails.
These are my logs
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
The text was updated successfully, but these errors were encountered:
Hi @saqib1324
Just an update on the webhook signature.
If you try and pull down Rett's XeroAPI/xero-ruby-oauth2-app#93.
The bundle install should update xero-ruby SDK and a few other things.
I also pulled down a new version of Ruby Gems, I did encounter a few issues including one with permissions, and ended up uninstalling rbenv and re-installing it.
Finally I got it working.
For reference here are the versions I'm now working with:-
Rails version 6.0.5
Ruby version ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [arm64-darwin22]
RubyGems version 3.1.6
Hi, I am trying to integrate webhooks with Ruby on Rails.
![Screenshot 2022-12-08 at 1 11 17 PM](https://user-images.githubusercontent.com/16830534/206393627-fcb37bcf-4de9-4506-9f2a-f4739ffb4a60.png)
These are my logs
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:
The text was updated successfully, but these errors were encountered: