# HTTP 404 Object\_Not\_Found

**URL:** <https://community.hubspot.com/t/http-404-object-not-found/64741>\
**Category:** APIs & Integrations\
**Created:** [September 8, 2022, 10:01pm UTC](https://community.hubspot.com/t/http-404-object-not-found/64741 "2022-09-08T22:01:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kabaja](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@Kabaja](https://community.hubspot.com/u/Kabaja)\
**Post date:** [September 8, 2022, 10:01pm UTC](https://community.hubspot.com/t/http-404-object-not-found/64741/1 "2022-09-08T22:01:32Z")

</div>

Hi there,

We’ve created a private App. Did the scope. Got the token. Send the following request:

//\*\*\*\*\*\*\*\*\*

var client = new RestClient(“[https://api.hubapi.com/crm/v3/objects/contacts](https://api.hubapi.com/crm/v3/objects/contacts)”);

var request = new RestRequest(Method.GET);  
request.AddHeader(“accept”, “application/json”);  
request.AddHeader(“authorization”, $“Bearer {token}”)

IRestResponse response = client.Execute(request);

//\*\*\*\*\*

Token is correct

We have over 3000 contacts

I have been getting HTTP 404 Object\_Not\_Found

Any help will be appreciated

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 9, 2022, 8:42pm UTC](https://community.hubspot.com/t/http-404-object-not-found/64741/2 "2022-09-09T20:42:21Z")

</div>

Hi, @Kabaja 👋 Welcome to the community. I have questions and not answers. And let’s see if we can get there anyway.

Questions:

- You are using the`GET /crm/v3/objects/contacts​`

- And you are using the C# example from the documentation? Is that correct?

I created a Private App with only the needed scope and tried from the documentation example:  
Request

```lia-code-sample
var client = new RestClient("https://api.hubapi.com/crm/v3/objects/contacts?limit=100&archived=false");
var request = new RestRequest(Method.GET);
request.AddHeader("accept", "application/json");
request.AddHeader("authorization", "Bearer YOUR_ACCESS_TOKEN");
IRestResponse response = client.Execute(request);

```

Response

```lia-code-sample
{
 "results": [
 {
 "id": "1",
 "properties": {
 "createdate": "2022-06-29T17:59:00.693Z",
 "email": "emailmaria@hubspot.com",
 "firstname": "Maria",
 "hs_object_id": "1",
 "lastmodifieddate": "2022-08-11T23:25:03.952Z",
 "lastname": "Johnson (Sample Contact)"
 },
 "createdAt": "2022-06-29T17:59:00.693Z",
 "updatedAt": "2022-08-11T23:25:03.952Z",
 "archived": false
 },
 {
 "id": "51",
 "properties": {
 "createdate": "2022-06-29T17:59:01.172Z",
 "email": "bh@hubspot.com",
 "firstname": "Brian",
 "hs_object_id": "51",
 "lastmodifieddate": "2022-08-02T17:50:32.754Z",
 "lastname": "Halligan (Sample Contact)"
 },
 "createdAt": "2022-06-29T17:59:01.172Z",
 "updatedAt": "2022-08-02T17:50:32.754Z",
 "archived": false
 },
 {
 "id": "101",
 "properties": {
 "createdate": "2022-06-30T04:07:35.653Z",
 "email": "jaycee@example.com",
 "firstname": null,
 "hs_object_id": "101",
 "lastmodifieddate": "2022-08-02T17:50:32.092Z",
 "lastname": null
 },
 "createdAt": "2022-06-30T04:07:35.653Z",
 "updatedAt": "2022-08-02T17:50:32.092Z",
 "archived": false
 },
 {
 "id": "201",
 "properties": {
 "createdate": "2022-06-30T05:20:31.927Z",
 "email": "jaycee222@example.com",
 "firstname": null,
 "hs_object_id": "201",
 "lastmodifieddate": "2022-08-02T17:50:33.777Z",
 "lastname": null
 },
 "createdAt": "2022-06-30T05:20:31.927Z",
 "updatedAt": "2022-08-02T17:50:33.777Z",
 "archived": false
 }
]
}

```

Can you share the full response body? Hey, [@klloyd\_\_1](https://community.hubspot.com/t5/user/viewprofilepage/user-id/381293) @DanielSanchez is there a better way to think about this one?

Thank you for taking a look! — Jaycee

---

<div class="post-metadata">

**Author:** ![Kabaja](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@Kabaja](https://community.hubspot.com/u/Kabaja)\
**Post date:** [September 10, 2022, 5:44pm UTC](https://community.hubspot.com/t/http-404-object-not-found/64741/3 "2022-09-10T17:44:45Z")

</div>

Hi [Jaycee,](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074)

Thank you for the follow-up.

The answer to All questions: Correct.

We’ve rotated a token couple of times. Use the same C# sample request.

For the above code sample, now we get 400. Here the response from the private App logs:

{  
“User-Agent”: [  
“RestSharp/108.0.2.0”  
],  
“CDN-Loop”: [  
“cloudflare; subreqs=1”  
],  
“Accept-Encoding”: [  
“gzip”  
],  
“CF-Connecting-IP”: [  
“2607:fea8:4f25:da00:4d77:5bed:952e:2a10”  
],  
“True-Client-IP”: [  
“2607:fea8:4f25:da00:4d77:5bed:952e:2a10”  
],  
“X-HubSpot-Trace”: [  
“0a0fa450d9fda22ef8ffa19c12309d48”  
],  
“Authorization”: [  
“Bearer pat-na\*\*\*\*\*\*”  
],  
“X-HubSpot-Correlation-Id”: [  
“024f982d-e4f9-4a9b-8e83-61f4a0749b1d”  
],  
“X-HS-Internal-Request”: [  
“1”  
],  
“X-Real-IP”: [  
“2607:fea8:4f25:da00:4d77:5bed:952e:2a10”  
],  
“cf-worker”: [  
“[hubapi.com](http://hubapi.com)”  
],  
“CF-Ray”: [  
“7489eb3637f6a1d8-IAD”  
],  
“Accept”: [  
“application/json”  
],  
“CF-IPCountry”: [  
“CA”  
],  
“X-Forwarded-Proto”: [  
“https”  
],  
“Connection”: [  
“close”  
],  
“X-Request-Start”: [  
“1662831312.375”  
],  
“X-HS-Internal-User-Request”: [  
“0”  
],  
“Host”: [  
“[api.hubapi.com](http://api.hubapi.com)”  
],  
“CF-Visitor”: [  
“{\“scheme\”:\“https\”}”  
],  
“X-HS-User-Request”: [  
“0”  
],  
“CF-EW-Via”: [  
“15”  
],  
“X-Forwarded-Port”: [  
“443”  
],  
“X-Amzn-Trace-Id”: [  
“Root=1-631ccad0-35b8136a7e6250330954ce7b”  
],  
“X-Forwarded-For”: [  
“2607:fea8:4f25:da00:4d77:5bed:952e:2a10, 172.70.42.143, 2607:fea8:4f25:da00:4d77:5bed:952e:2a10”  
],  
“X-Scheme”: [  
“https”  
]  
}

\*\*\*\*\*\*\*\*\*\*\*\*\*\*From the debugger:

System.Collections.Generic.List`1[RestSharp.HeaderParameter] {“status”:“error”,“message”:“Unable to infer object type from: 0”,“correlationId”:“024f982d-e4f9-4a9b-8e83-61f4a0749b1d”} System.Net.Http.HttpRequestException: Request failed with status code BadRequest RestSharp.RestRequest

URI:"[https://api.hubapi.com/crm/v3/objects/0"](https://api.hubapi.com/crm/v3/objects/0)

---

<div class="post-metadata">

**Author:** ![Kabaja](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@Kabaja](https://community.hubspot.com/u/Kabaja)\
**Post date:** [September 12, 2022, 5:50pm UTC](https://community.hubspot.com/t/http-404-object-not-found/64741/4 "2022-09-12T17:50:26Z")

</div>

Thank you. This issue has been resolved. FYI couple of issues

#1

RestClient(“[https://api.hubapi.com/crm/v3/objects/companies//associations/?limit=500](https://api.hubapi.com/crm/v3/objects/companies//associations/?limit=500)”);

will always return 400 “bad requests” I believe the server max is limit=100

So any request over 100 with any object will return 400 Bad requests.

Issue #2

Not sure with RestSharp in many cases was returning a bad request. " This is documented well on the web"
