cancel
Showing results for 
Search instead for 
Did you mean: 

Providing Authentication for Triggered Tasks by passing credentials via https request

SuhasPothedar
New Contributor II

How can I provide authentication without passing user name and password every time?
I tried using bearer token in triggered task, even then it is asking me to provide basic authentication.
Additionally, is there any secured way to pass basic authentication via https request?

1 ACCEPTED SOLUTION

sriram
Former Employee

Basic auth is not required as long as a valid bearer token is used:

<SnapLogic_Task_URL>?bearer_token=VALUE

Example to invoke triggered tasks:
https://elastic.snaplogic.com/api/1/rest/slsched/feed/org/project_space/project_name/task_name?beare...

View solution in original post

4 REPLIES 4

del
Contributor III

I’m presuming a typo or syntax error. Bearer token should work as long as you provide it in the Request HTTP header in the format “Authorization: Bearer {token}”.

Here’s a Postman example:
image

ssanikop
Former Employee

Make sure to use the correct URL. There will be two URL’s if you are using groundplex. Also, you might have to setup firewall rules if the call is from outside the firewall.

https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438189/How+to+Run+a+Pipeline+from+a+URL+T...

Running an On-Premises Pipeline from a URL
If you are running a pipeline in an on-premises Snaplex and streaming data to/from the pipeline, you must use the “On-Premises URL” to execute the pipeline, the “Cloud URL” will not work. The “On-Premises URL” will refer to the Groundplex machine from which you can perform the request. The request must be done on the Groundplex machine since the service is only listening for connections from the local machine. If you would like to allow requests from other hosts, you can configure the machine’s firewall rules or install a proxy to forward the requests to the Groundplex service.

sriram
Former Employee

Basic auth is not required as long as a valid bearer token is used:

<SnapLogic_Task_URL>?bearer_token=VALUE

Example to invoke triggered tasks:
https://elastic.snaplogic.com/api/1/rest/slsched/feed/org/project_space/project_name/task_name?beare...

Thank you very much, it is working now. Before this, i was directly passing Auth in the url, may be that’s why it didn’t work.