Dynamic cloud id is not supported in Jira integration
As described in the Jira OAuth documentation, requests that use OAuth 2.0 (3LO) are made via api.atlassian.com (not https://your-domain.atlassian.net).
The URL should use the following structure: Jira apps: https://api.atlassian.com/ex/jira/{cloudid}/{api}
And an authenticated call to https://api.atlassian.com/oauth/token/accessible-resources should be made to retrieve the cloudId...
I see two options:
- Update Pizzly core to be able to include a prefetch call that would dynamically define the baseUrl from the definition
- Include a new proxy header such as
Pizzly-Base-Urlto define dynamically the base URL (that would be useful too for other platforms such as Salesforce)
BTW, the /oauth/token/accessible-resources endpoint may return an array, and therefore it looks like there is no way to retrieve the site selected by the user during the scope approval process :-(
So my recommendation would be to include a new option in the proxy that would force the baseUrl property.
@guillaumemeyer I believe Pizzly should support forcing the baseUrl. It's something required as well to fully support other APIs, such as Google Sheets API, that sometimes have different baseUrl depending on the actions performed.
Are you interested in giving it a try?
Count me in to try it asap @Frenchcooc . I need this capability for both Jira Cloud and Salesforce.
Any news?
@guillaumemeyer Hey, your earlier comment made it sound like you were working on it. Is that not the case?