Hello community,
I have an issue not able to figure it out how to fix.
My user has a workflow, published to the gallery, and used her credentials when publishing. When she runs, she writes the output to a network folder, it works.
She wants to automate the process, so she doesn't want to schedule the workflow on the server. Whatever the other external process was completed, it triggers and calls the workflow through the API. API runs the workflow, but it fails to write output to a network folder.
When we compare the workflow results, we found that, in the first scenario, running directly form the gallery, gallery use her credentials. But API scenario, it shows that the workflow ran in the gallery as local user. This shouldn't be the case, because when she published the workflow to the server, she provided her credentials. Even it's used 'Always use that credentials' option, no success.
Any suggestion how to fix it?
CredentialId is an optional field. You can generate the token using a fixed credential using the Oauth2.0 API call. Then use that as input in header as bearer token.
Header would be ‘Authorization’: ‘Bearer {your token here}.
Token generated will be valid only for an hour or so, hence you need to generate it everytime you run the automation. That is the best practice.
So... if I understood you correctly, my user should make an API call to create the token, then use it on execution to create the job. I will do this by myself. I can create easily with the macros, use that token to create the job within my credentials. Worth to try.
Nope, this doesn't work. I mean, it runs, but run as LOCAL USER on the server. I need to run as WORKFLOW OWNER.
Hello Albert,
I am new to using the API and I was wondering if you could provide a basic example on how to connect. Are you using Python? I have access to the API in the gallery, and the API client and secret are also available for my user. However, I have not been able to use it correctly. My goal is to be able to run a job using the API.