JetBrains / YouTrackSharp

.NET Standard 2.0 Library to access YouTrack API.
https://www.jetbrains.com/youtrack
Apache License 2.0
134 stars 105 forks source link

BearerTokenConnection not working #93

Open sgsmittal226 opened 4 years ago

sgsmittal226 commented 4 years ago

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 commented 4 years ago

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