Web Hooks  Topic is solved

Discussions relating to the REST API of Jiwa 7.

Re: Web Hooks

Postby Mike.Sheen » Mon Oct 28, 2019 11:05 pm

SBarnes wrote:Further to this how would the incoming hook end up with a logged in manager to work with, as the only way I am assuming you could do it is with an api key as part of the query string held by the sender as username and password are definitely not going to work?


To answer specifically this part of your question:

SBarnes wrote:username and password are definitely not going to work?


For all intents and purposes, correct.

But not quite... If a sender to one of our routes is a webhook from another 3rd party API that has the ability to authenticate using credentials authentication (username and password), and can read that response containing the Session Id in the response and make a subsequent request passing the session id as a request header before the session times out, then it will work.

API Keys would work better, and that is what is recommended for the use case of using the Jiwa API to receive webhooks from 3rd party API's.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Web Hooks

Postby SBarnes » Wed Oct 30, 2019 12:02 pm

Unless I am missing something isn’t the following passing the key as the query string


https://api.jiwa.com.au/Staff/Current/L ... uE-M8gBlA8
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1618
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Web Hooks

Postby Mike.Sheen » Fri Nov 01, 2019 2:09 pm

SBarnes wrote:Unless I am missing something isn’t the following passing the key as the query string


https://api.jiwa.com.au/Staff/Current/L ... uE-M8gBlA8


Yes, but you don't have to provide the API Key that way, you can use a HTTP Bearer token - which is simply a request header of the following:

Authorization: Bearer <APiKey>

In the above the request header key is "Authorization" and the value is "Bearer " and the API Appended to that.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Web Hooks

Postby SBarnes » Fri Nov 01, 2019 3:27 pm

Yeah but my idea is to use it on the Query String for an incoming to Jiwa web hook where the sender doesn't support headers/authentication/logins, for example Salesforce doesn't.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1618
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Web Hooks

Postby Mike.Sheen » Fri Nov 01, 2019 3:32 pm

SBarnes wrote:Yeah but my idea is to use it on the Query String for an incoming to Jiwa web hook where the sender doesn't support headers/authentication/logins, for example Salesforce doesn't.


Sure, that's fine. A lot of people prefer not to pass API Keys that way, so we just give you the choice.

And in case this terminology is what confused you - In my mind Query strings and URL parameters mean the same thing, and I often use the terms interchangeably.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Web Hooks

Postby SBarnes » Sat Nov 02, 2019 3:31 pm

Just so long is it will work, which it appears it will, it will solve the problem.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1618
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Previous

Return to REST API

Who is online

Users browsing this forum: No registered users and 2 guests