添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
微醺的墨镜  ·  NIST SP 800-147: ...·  2 月前    · 
狂野的伏特加  ·  Advanced search·  5 月前    · 
火星上的火腿肠  ·  GitHub - ...·  1 年前    · 

My question :
I got “token ‘U’ at 1:1 Unauthorized request” when I use Newman to run my collection.
JSONError Unexpected token ‘U’ at 1:1
Unauthorized request
Details (like screenshots) :

  • I generated API Key, and get uid for the collection, and uid for the environment according to newman/README.md at develop · postmanlabs/newman · GitHub
  • The command to run the collection is like this:
    $ newman run “ https://api.getpostman.com/collections/$uid?apikey=$apiKey
    –environment “ https://api.getpostman.com/environments/$uid?apikey=$apiKey
  • I set up token as the environment variables in my collection.
  • I can run the same collections in Postman successfully.
  • How I found the problem :

  • Run collection via Newman
  • I’ve already tried :

  • Run collection in Postman console
  • Hi @CathyWang

    This may not completely resolve the issue but if you are going to use the “long notation” I think you are missing a - from “environment”.

    Should be either -e or --environment (Note the 2x - for the latter)

    More info here;