MrRefactoring / jira.js

A JavaScript/TypeScript wrapper for the JIRA Cloud, Service Desk and Agile REST API
https://mrrefactoring.github.io/jira.js/
MIT License
349 stars 46 forks source link

Using Agile Client to get Boards returns Authentication error #270

Open GodwinUjeen opened 11 months ago

GodwinUjeen commented 11 months ago

Hi, I have tried to get all boards using agile client, however i tried it always returns,

{
    "status": "fail",
    "message": "Client must be authenticated to access this resource."
}

The Code I have tried:

       const client = new AgileClient({
            host: 'https://host.atlassian.net',
            authentication: {
                basic: {
                    email: '<my-email>',
                    apiToken: '<API-Token>',
                },
            },
            newErrorHandling: true,
        });

        return client.board.getAllBoards();

I have tried using version 3 client also but it's not working.