Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BearerTokenConnection not working #93

Open
sgsmittal226 opened this issue Oct 29, 2019 · 1 comment
Open

BearerTokenConnection not working #93

sgsmittal226 opened this issue Oct 29, 2019 · 1 comment

Comments

@sgsmittal226
Copy link

sgsmittal226 commented Oct 29, 2019

I was trying to add comment using code into particular youtrackitem.
but it is giving 404 error. not sure what is correct api url

var youtrackConnection = new YouTrackSharp.BearerTokenConnection("https://xxxx.myjetbrains.com/youtrack/api/", "token");

                var issuesService = youtrackConnection.CreateIssuesService();

                Task backgroundJobAwaiter = Task.Run(async () =>
                {
                    try
                    {
                        await issuesService.ApplyCommand("Project-1090", command: "Comment", comment: "Test");
                    }
                    catch (Exception ex)
                    {
                        Console.Write(ex);
                    }
                });

                backgroundJobAwaiter.Wait();

image

@maartenba
Copy link
Contributor

Can you try with https://xxxx.myjetbrains.com/youtrack/ as the URL? (Drop the /api)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants