[英]How to provide Username and Password on Postman while calling an API
I tried to call an API from Postman and I give Username and password in authorisation tab in Postman and not working. 我尝试从Postman调用API,并在Postman的“授权”选项卡中提供了用户名和密码,但无法正常工作。
But I can access API data in the browser when I put the URL after successfully login with username and password as shown 但是,使用用户名和密码成功登录后输入URL时,可以在浏览器中访问API数据,如下所示
So how can I give my credentials to postman to get API data? 那么,如何将我的凭据提供给邮递员以获取API数据?
Can you try to see what parameters it sends when requested via browser? 您能否尝试查看通过浏览器请求时发送的参数?
You can do that in Chrome: 您可以在Chrome中执行以下操作:
Then send your request. 然后发送您的请求。 You'll be able to see request headers and body. 您将能够看到请求标头和正文。 Then you can copy the parameters over to your postman call. 然后,您可以将参数复制到邮递员电话中。 Most calls like that are using authorization token. 像这样的大多数呼叫都使用授权令牌。 You'll also be able to see if the token was requested in the separate call and if it was passed as a parameter. 您还可以查看令牌是否在单独的调用中被请求以及是否作为参数传递。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.