使用Postman访问Dynamics 365 API [英] Accessing Dynamics 365 API using Postman

查看:470
本文介绍了使用Postman访问Dynamics 365 API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用邮递员针对Dynamics 365 API帐户发出API请求。我具有以下凭据,但我不知道要使用哪些标头进行身份验证。



我具有以下...


  1. 消费者密钥

  2. 消费者秘密

  3. 重定向Uri

  4. 授权重定向URL

  5. HTTP方法= POST

  6. 访问令牌服务端点

我需要在Postman中设置哪些标头才能访问API?



我已阅读文章并看到了一些示例,但它们都有不同之处数据比我大。例如,在下面的屏幕截图中,除了使用者密钥(client_id)和使用者密钥(client_secret)外,还有用户名和密码。





我确实了解,在制作API之前,我需要先获取 Bearer令牌呼叫。

解决方案

只需遵循此


授权选项卡中使用 OAuth 2.0 ,然后获取新访问令牌




I am trying to make an API request against a Dynamics 365 API account using Postman. I have the following credentials but I do not know what headers to use to authenticate.

I have the following ...

  1. Consumer Key
  2. Consumer Secret
  3. Redirect Uri
  4. Authorize Redirect URL
  5. HTTP Method = POST
  6. Access Token Service Endpoint

What headers do I need to set in Postman to get access to the API?

I have read articles and seen some examples but they all have different data than I do. For example in the screen capture below there is a username and password in addition to a Consumer Key (client_id) and Consumer Secret (client_secret).

I do understand that I need to obtain a Bearer token first before making the API call. It is obtaining this token that is confusing me.

解决方案

Simply follow this documentation to setup the Postman for Dynamics web API, even the ready-made clientid = 51f81489-12ee-4a9e-aaae-a2591f45987d will work for any CRM online instance for testing purpose. You can use your customer provided clientid as well.

url should be https://crmdev.crm.dynamics.com
authurl should be https://login.microsoftonline.com/common/oauth2/authorize?resource={{url}}

First create an environment in Postman:

Use OAuth 2.0 in Authorization tab, and Get New Access Token.

这篇关于使用Postman访问Dynamics 365 API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆