"Either 'usernames' or 'keys' or 'accountIDs' need to be provided"

I am trying this:

const users = await asociateUsers.join("&");

*//accountId=5f58d00cdf83ab007d7&accountId=5f58d00cdf83ab007d7*

const result = await api
.asApp()
.requestJira(route`/rest/api/3/user/bulk?${users}`, {
headers: {
Accept: "application/json",
},
});

And get this error:


{
"errorMessages": [
"Either 'usernames' or 'keys' or 'accountIDs' need to be provided"
],
"errors": {}
}

if I use this directly

route`/rest/api/3/user/bulk?accountId=5f58d00cdf83ab007d7

it works ok

Hi @EsmerlinPaniagua1,

Welcome to our community here.

If you try to change the code in the following way, you should be able to get the expected results:

const bulkUserURL = route`/rest/api/3/user/bulk?accountId=5f58d00cdf83ab007d7&accountId=5f58d00cdf83ab007d7`;

const result = await api
.asApp()
.requestJira(bulkUserURL`, {
headers: {
Accept: "application/json",
},
});

Hope this helps,
Caterina