# Getting did not provide valid JSON data error while running my collection from Newman

**URL:** <https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465>\
**Category:** Help Hub\
**Tags:** newman-project, collections\
**Created:** [March 17, 2021, 6:00am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465 "2021-03-17T06:00:22Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiten.khanna](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jiten.khanna](https://community.postman.com/u/jiten.khanna)\
**Post date:** [March 17, 2021, 6:00am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/1 "2021-03-17T06:00:23Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

Hi Team,

we are facing issue while accessing my collection from newman.

error: collection could not be loaded  
the url “[https://www.getpostman.com/collections/7c305b7e7af4f49f93b6](https://www.getpostman.com/collections/7c305b7e7af4f49f93b6)” did not provide valid JSON data  
Unexpected token ‘\<’ at 1:1

^

It was working fine 2 days back.  
Can someone please help.

Regards  
Jiten

---

<div class="post-metadata">

**Author:** ![thefierycoder](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@thefierycoder](https://community.postman.com/u/thefierycoder)\
**Post date:** [March 17, 2021, 6:49am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/2 "2021-03-17T06:49:38Z")

</div>

Hello Jiten,  
your postman URL is not working, If you make any changes in your collection then you need to update the URL.  
Please share it again, so, we can see your code and help you to fix the issue.

---

<div class="post-metadata">

**Author:** ![jiten.khanna](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jiten.khanna](https://community.postman.com/u/jiten.khanna)\
**Post date:** [March 17, 2021, 6:52am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/3 "2021-03-17T06:52:18Z")

</div>

This is the latest and updated URL. If its not working then maybe there is an issue with how Postman is generating the URL. I have updated the URL again in case it helps.

---

<div class="post-metadata">

**Author:** ![thefierycoder](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@thefierycoder](https://community.postman.com/u/thefierycoder)\
**Post date:** [March 17, 2021, 6:57am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/4 "2021-03-17T06:57:29Z")

</div>

still not working for me😔  
Did you follow [these steps](https://learning.postman.com/docs/collaborating-in-postman/sharing/#sharing-by-link) to get your collection public link?  
or share your code in text form.

---

<div class="post-metadata">

**Author:** ![jiten.khanna](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jiten.khanna](https://community.postman.com/u/jiten.khanna)\
**Post date:** [March 17, 2021, 7:07am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/5 "2021-03-17T07:07:57Z")

</div>

Yes, I have been using Postman and Newman since last 6 months. And everything was working fine till day before. Don’t know what happened. Other collections are working fine. Issue is with this collection only. You can try with the following link. Just generated:

[https://www.getpostman.com/collections/e2ea7683ddf6bfc355d3](https://www.getpostman.com/collections/e2ea7683ddf6bfc355d3)

---

<div class="post-metadata">

**Author:** ![thefierycoder](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@thefierycoder](https://community.postman.com/u/thefierycoder)\
**Post date:** [March 17, 2021, 7:13am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/6 "2021-03-17T07:13:40Z")

</div>

It’s showing 502 Bad Gateway

---

<div class="post-metadata">

**Author:** ![jiten.khanna](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jiten.khanna](https://community.postman.com/u/jiten.khanna)\
**Post date:** [March 17, 2021, 7:15am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/7 "2021-03-17T07:15:35Z")

</div>

Exactly. Thats why Newman is unable to get data. Issue is Postman generating the link. Try the following for another collection. This one’s working fine.

[https://www.getpostman.com/collections/3ba87bf2877688b4fa4d](https://www.getpostman.com/collections/3ba87bf2877688b4fa4d)

---

<div class="post-metadata">

**Author:** ![thefierycoder](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@thefierycoder](https://community.postman.com/u/thefierycoder)\
**Post date:** [March 17, 2021, 7:19am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/8 "2021-03-17T07:19:14Z")

</div>

Yes, it’s showing a json object.

---

<div class="post-metadata">

**Author:** ![jiten.khanna](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jiten.khanna](https://community.postman.com/u/jiten.khanna)\
**Post date:** [March 17, 2021, 7:20am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/9 "2021-03-17T07:20:17Z")

</div>

So can you help me understand whats the issue with the collection link that I want to use. Its working fine with Postman. Issue comes up with shared link.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [March 17, 2021, 7:57am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/10 "2021-03-17T07:57:33Z")

</div>

I can see the JSON response when opening that link.

What command are you using for Newman add can you show the error message you see in the console output?

Also, I’d strongly suggest that you use the Postman API with an Auth token rather than the public shared link, that can potentially contain sensitive information.

---

<div class="post-metadata">

**Author:** ![jiten.khanna](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jiten.khanna](https://community.postman.com/u/jiten.khanna)\
**Post date:** [March 17, 2021, 8:11am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/11 "2021-03-17T08:11:11Z")

</div>

We need to run this collection through Jenkins, so we don’t have any other option but to use a Public link. Getting the following Error:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/5/a/5a46cbb2d56dd6a345df311bb0d96567814b8814.png)

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [March 17, 2021, 8:40am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/12 "2021-03-17T08:40:22Z")

</div>

Which version of Newman is that using?

Is there some sort of VPN or firewall preventing that URL from opening correctly?

---

<div class="post-metadata">

**Author:** ![jiten.khanna](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jiten.khanna](https://community.postman.com/u/jiten.khanna)\
**Post date:** [March 17, 2021, 9:13am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/13 "2021-03-17T09:13:56Z")

</div>

I’m using newman “version”: “5.2.2” , No there is no firewall preventing opening this, as other collections URL is opening properly.

only below collection URL is not working.

[https://www.getpostman.com/collections/e2ea7683ddf6bfc355d3](https://www.getpostman.com/collections/e2ea7683ddf6bfc355d3)

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [March 17, 2021, 9:32am UTC](https://community.postman.com/t/getting-did-not-provide-valid-json-data-error-while-running-my-collection-from-newman/21465/14 "2021-03-17T09:32:08Z")

</div>

It looks like that link doesn’t exist anymore, it may have been deleted or the Collection might have been deleted.

A subset of that response information:

```auto
{
"result": "error",
"name": "instanceNotFoundError",
"statusCode": 404,
"event": "Link does not exist.",
}

```

If you go to the Share option and recreate a public link for the Collection, then run this with Newman is it working.

Again, I would use the Postman API for this for reasons of security more than anything else but it’s also a realtime view of the Collection rather than something you need to manually update each time you make a change.

```auto
newman run https://api.getpostman.com/collections/{{collection_uid}}?apikey={{APIKey}}

```

More information on the Postman API can be found in the Postman Public Workspace:

[https://www.postman.com/postman/workspace/postman-public-workspace/request/12959542-e52ed203-8c5f-4c71-88fd-c6662f4a4e15?ctx=documentation](https://www.postman.com/postman/workspace/postman-public-workspace/request/12959542-e52ed203-8c5f-4c71-88fd-c6662f4a4e15?ctx=documentation)
