#Nishanth-reports

1 messages ยท Page 1 of 1 (latest)

zenith vale
queen coyote
#

Also is there no API endpoint to download the csv directly without the username and password?

#

@zenith vale Can you plz help me?

zenith vale
#

We give you details on how to retrieve the results of you report run here:

queen coyote
#

Thanks, can you please keep this conversation open for an hour?

#

So that I can ask any doubts I get

zenith vale
#

We usually leave threads open an hour and then close them if we haven't heard from you - if your thread gets closed just let us konw and we can always reopen it

queen coyote
#

Okay thanks. What is the average time required for the report status to change from "pending" to "succeeded"?

#

So that I can include a Delay in my code

zenith vale
#

There is not "average time" - it really depends on the kind of report and how much data is being processed

queen coyote
#

okay

queen coyote
#

Hi, need some more help

#

How do I authorize through the code? I am getting 401 unauthorized with the below code:

WebClient webClient = new WebClient();
webClient.Headers.Add(HttpRequestHeader.Authorization, key);
var data = webClient.DownloadData(response.Result.Url.ToString());

narrow belfry
#

hey there @queen coyote -- can you share the request ID of the error you encounter?

queen coyote
#

frr_1KGqJxDR9GxscM5OaXnBoela

Its just a 401 Unauthorized error

#

I wanted to know how do we authorize the request via C# code. I tried adding headers but didn't work

narrow belfry
#

Sure but can you share the request ID? Do you have a request-id header in the response you receive?

#

Are you using the dotnet stripe client, or making manual HTTP requests?

queen coyote
#

Request ID : frr_1KGqJxDR9GxscM5OaXnBoela
I'm using the dotnet stripe client but using WebClient to download the csv to local computer. Do let me know if there is a better alternative?

#

I was able to authorize it using below:

webClient.Credentials = new NetworkCredential(key, key);

#

How do I set the report columns to "All"?

narrow belfry
#

that is not a request id, that is a report id. a request id looks like req_123456

queen coyote
#

No prob, I figured out how to authorize the request

narrow belfry
#

Hmm I'm not sure what WebClient is or how it works.

#

You got your key added in the header?

#

Excellent ๐Ÿ™‚

queen coyote
#

Yes, it worked

narrow belfry
#

๐Ÿ‘

queen coyote
#

Can you help me with
How do I set the report columns to "All"?

#

I mean here

var options = new ReportRunCreateOptions
{
ReportType = "connected_account_balance_change_from_activity.itemized.1",
Parameters = new ReportRunParametersOptions
{
IntervalStart = new DateTime(2021, 12, 1),
IntervalEnd = new DateTime(2022, 1, 10),
ConnectedAccount = "acct_1GhhMiEzb8Wd40Wx",
},
};

narrow belfry
queen coyote
#

oh okay

#

Thanks

narrow belfry
#

NP!