Hi, Could help please?
Requirement: using forms Text field to add participants for JSM request.
Solution: using automation rule, get the email address from forms Text field, then using "send web request" to get the account ID, then add the account ID to request participants.
p1: automation rule
Problem: Got the error 403 as blow.
p2: error 403
My question: 1. do you know how to solves this problem? 2. do you know the account or token which sent the API?
Hi @Vina Wu
First, are the mentioned email addresses from existing users, as the endpoint you are accessing is to get users in the system.
As @Kai Krause mentions, adjust your call, as it is incorrect
These need to be users, so no a JSM customer only, also these users need to be active (they have been invited or added and have accepted the invite or logged in once)
If you want to get existing customers, use https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk/#api-rest-servicedeskapi-servicedesk-servicedeskid-customer-get
To add Request participants by automation, you need their account ID, to add them.
See; add-update-remove-request-participants-using-automation-in-jsm-cloud
Example on getting account ID.
Thank you very much both @Marc -Devoteam- @Kai Krause .
Yes, these users are active in Jira.
Seems the API is working now after setting as you said.
but the account ID seems can't be added. could you please help check if my next action/edit work item is correct(actually i copy from Manage Request Participants with Automation in JSM Cloud | Jira and Jira Service Management | Atlassian Support)?
P3: "Send web request"
P4: "edit work item"
P5: "audit logs"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, i think you have to use
{{webResponse.body.first.accountId}}
to get the accountId from the response from the api., because you get an array back.
BR
Kai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vina Wu
What is the response of the web request.
Can you log this, as it seems there is no valid response.
What if you make the request in a browser window, using the URL and the mail address provided in the field.
Is you variable in the branch also set to {{EMAIL}}, naming needs to be correct in the web request on the variable name from the branch action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
i think
you have to call
https://<yoururl>.atlassian.net/rest/api/3/user/search?query={{EMAIL.urlEncode}}
with empty body as get and in the headers Authorization with a Basic < Base64-Api-Key
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.