I am trying to get the contents of a page with Dapplo.Confluence nuget, but it does not output anything.
static void Main(string[] args)
{
Confluence();
}
public static async void Confluence()
{
var confluenceClient = ConfluenceClient.Create(new Uri("https://testtest6601.atlassian.net/wiki"));
confluenceClient.SetBasicAuthentication(@"{email}", @"{token}");
var query = 458753;
var pages = await confluenceClient.Content.GetAsync(query);
Console.WriteLine(pages);
var content = await confluenceClient.Content.GetAsync(pages, ConfluenceClientConfig.ExpandGetContent);
Console.WriteLine(content);
//foreach (var contentDigest in pages.Results)
//{
// // As the content from the Search is a digest, get the details (it's also possible to get the details during the search)
// var content = await confluenceClient.Content.GetAsync(contentDigest, ConfluenceClientConfig.ExpandGetContentWithStorage);
// // Output the information
// Console.WriteLine(content.Body);
// break;
}
Does anyone have an idea or an example of this working?
Welcome to the Atlassian Community!
My guess is that you need to adjust your code to use tokens to authenticate - basic authentication is not available on Cloud. If it's not that, then you'll need to talk to Dapplo about getting the actual errors back.
Yes, that's what I said
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.