# API Version - Missing or Invalid (C#)

**URL:** <https://discuss.dwolla.com/t/api-version-missing-or-invalid-c/6928>\
**Category:** API Support\
**Created:** [April 2, 2021, 1:42pm UTC](https://discuss.dwolla.com/t/api-version-missing-or-invalid-c/6928 "2021-04-02T13:42:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmatlock](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@mmatlock](https://discuss.dwolla.com/u/mmatlock)\
**Post date:** [April 2, 2021, 1:42pm UTC](https://discuss.dwolla.com/t/api-version-missing-or-invalid-c/6928/1 "2021-04-02T13:42:26Z")

</div>

Hello. I am trying to use the C# dwolla client, and used the example app to get the DwollaBroker into my existing application. I can set the authorization header like so:

```auto
RestResponse<TokenResponse> response = await this.dClient.PostAuthAsync<TokenResponse>(
    new Uri($"{this.dClient.ApiBaseAddress}/token"), new AppTokenRequest { Key = key, Secret = secret });

```

Which works fine, as far as I can tell. However, when I try to get any other endpoint (such as Root), I get the following:  
“Missing or invalid API version.”

I found another topic on this, which talked about the accept header, only I’ve already added that as well:

```auto
this._headers.Add("Accept", "application/vnd.dwolla.v1.hal+json");

```

![image](https://global.discourse-cdn.com/dwolla/original/2X/2/253af3633e0f8875f97e0ba9fc48dd06bc7b1b2d.png)

Could you please advise on what I am doing wrong? I was able to get the Postman collection working just fine, added and queried customers without issue.

Thank you.

---

<div class="post-metadata">

**Author:** ![spencer](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/spencer/32/2143_2.png) [@spencer](https://discuss.dwolla.com/u/spencer)\
**Post date:** [April 5, 2021, 2:58pm UTC](https://discuss.dwolla.com/t/api-version-missing-or-invalid-c/6928/2 "2021-04-05T14:58:36Z")

</div>

Hi @mmatlock , Would you be able to provide a timestamp of that request? Also, if you have the `X-Request-Id` response header that will be helpful in locating that request in our logs.

---

<div class="post-metadata">

**Author:** ![mmatlock](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@mmatlock](https://discuss.dwolla.com/u/mmatlock)\
**Post date:** [April 5, 2021, 3:27pm UTC](https://discuss.dwolla.com/t/api-version-missing-or-invalid-c/6928/3 "2021-04-05T15:27:44Z")

</div>

@spencer : It happens with every call attempt via C# that isn’t setting the Auth header.

I just tried it again today at around 10:20-10:25 Central time, X-Request-ID = 8b5b9bc7-8c6b-409a-8d9b-5e1c1ce4a482

Specific timestamp: 2021-04-05 15:22:49 GMT

Hope that helps, thanks

---

<div class="post-metadata">

**Author:** ![spencer](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/spencer/32/2143_2.png) [@spencer](https://discuss.dwolla.com/u/spencer)\
**Post date:** [April 5, 2021, 3:46pm UTC](https://discuss.dwolla.com/t/api-version-missing-or-invalid-c/6928/4 "2021-04-05T15:46:15Z")

</div>

Thanks @mmatlock , It looks like the Accept header value that includes Dwolla’s custom media-type is being passed in twice which might be throwing off the request. `accept=application/vnd.dwolla.v1.hal+json, application/vnd.dwolla.v1.hal+json`. I believe this should be handled by the [client library](https://github.com/Dwolla/dwolla-v2-csharp/blob/master/Dwolla.Client/DwollaClient.cs#L120) which abstracts away the need to add this header.

---

<div class="post-metadata">

**Author:** ![mmatlock](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@mmatlock](https://discuss.dwolla.com/u/mmatlock)\
**Post date:** [April 5, 2021, 4:30pm UTC](https://discuss.dwolla.com/t/api-version-missing-or-invalid-c/6928/5 "2021-04-05T16:30:15Z")

</div>

Ah. Thank you, that appears to have fixed it… Looks like it also should abstract away the headers that are needed to be added for the POST requests as well? Is that accurate?

---

<div class="post-metadata">

**Author:** ![spencer](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/spencer/32/2143_2.png) [@spencer](https://discuss.dwolla.com/u/spencer)\
**Post date:** [April 5, 2021, 5:59pm UTC](https://discuss.dwolla.com/t/api-version-missing-or-invalid-c/6928/6 "2021-04-05T17:59:39Z")

</div>

yep that’s correct!
