Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I send a valid HTTP request to GitHub from a scheduled automation?

Allan Lewis February 28, 2024

GitHub requires incoming requests to have a user agent header but Trello automations don't set this on outgoing requests, so I get a 403 error:

403 Request forbidden by administrative rules. Please make sure your request has a User-Agent header (https://docs.github.com/en/rest/overview/resources-in-the-rest-api#user-agent-required). Check https://developer.github.com for other possible causes.

So it seems I can't use this feature to make requests to GitHub's APIs 😢

To test this you could use a URL like https://api.github.com/repos/astral-sh/ruff/releases/latest

1 answer

0 votes
Sal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 29, 2024

Hi @Allan Lewis! Have you tried switching your API request with Automation to POST or PUT requests? As far as I know, GET requests don't allow you to add headers and a payload, but when using POST and PUT requests, you can send them with headers and payload, as shown below:

AutomationAPIRequestWithHeadersPayload.jpg

Let me know if that works for you, Allan! Also, you can read more about using HTTP request with Automation here: https://support.atlassian.com/trello/docs/issuing-http-requests/

Allan Lewis February 29, 2024

Hi, Sal - sorry but that won't work for me as I need to use a GET request. Can you please raise a feature request to either allow headers for GET requests, or just include standard headers like User-Agent by default? It would also be good to allow query params with requests regardless of method.

Sal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 29, 2024

Sure, Allan! Let me bring your interest in this to our team. However, I can't promise you that we'll ship it. Still, we'll start collecting our users' interest and feedback, which will help our team decide whether they want to add this to our roadmap. Thanks for sharing your feedback and interest on this and helping us improve Trello! 

Allan Lewis February 29, 2024

I can promise you that we'll ship it.

Excellent! ...or was that a typo? 😬

Like Sal likes this
Sal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 29, 2024

Oh! That was definitely a typo! :D Thanks for letting me know, Allan! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events