# Convert Postman “get new authorization token” to curl command

**URL:** <https://community.postman.com/t/convert-postman-get-new-authorization-token-to-curl-command/23597>\
**Category:** Help Hub\
**Created:** [May 10, 2021, 1:11pm UTC](https://community.postman.com/t/convert-postman-get-new-authorization-token-to-curl-command/23597 "2021-05-10T13:11:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ariintelligents](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@ariintelligents](https://community.postman.com/u/ariintelligents)\
**Post date:** [May 10, 2021, 1:11pm UTC](https://community.postman.com/t/convert-postman-get-new-authorization-token-to-curl-command/23597/1 "2021-05-10T13:11:11Z")

</div>

Hi!

I’m trying to generate/export CURL code from Postman. This works very well with single GET request with basic authentication. I can build the command in Postman (nice UI) and generate/export code in many formats including CURL.

> **[cURL and Postman work wonderfully together | Postman Blog](https://blog.postman.com/curl-and-postman-work-wonderfully-together/)**
>
> cURL is the most used command line tool for making API calls. However, it is a little cumbersome to work directly with cURL, since even a simple cURL request looks like this: Postman has a nice UI, which makes it easy to add/remove parameters,...

Now with Dynamics Business Central software, I need get access token first (oAuth 2.0) and then get the actual data.

> **[Getting Started Developing Connect Apps for Dynamics 365 Business Central -...](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-develop-connect-apps#AAD)**
>
> Learn how to get started developing a Connect app

All works fine in Postman, but…

1. Get oAuth token → How to get/export CURL code for this?
2. Get actual data → This works fine, I can get CURL code snippet

Thanks!

---

<div class="post-metadata">

**Author:** ![rachael.elizabeth.th](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/rachael.elizabeth.th/32/7185_2.png) [@rachael.elizabeth.th](https://community.postman.com/u/rachael.elizabeth.th)\
**Post date:** [May 11, 2021, 1:34pm UTC](https://community.postman.com/t/convert-postman-get-new-authorization-token-to-curl-command/23597/2 "2021-05-11T13:34:36Z")

</div>

@ariintelligents I wasn’t able to reproduce the following:

> 1. Get oAuth token → How to get/export CURL code for this?

However I did find [this article](https://dynamics-chronicles.com/article/access-dynamics-365-using-curl) that I think would be helpful and has a sample cURL request for Dynamics 365.

---

<div class="post-metadata">

**Author:** ![ariintelligents](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@ariintelligents](https://community.postman.com/u/ariintelligents)\
**Post date:** [May 12, 2021, 3:43pm UTC](https://community.postman.com/t/convert-postman-get-new-authorization-token-to-curl-command/23597/3 "2021-05-12T15:43:01Z")

</div>

Thanks, I’ll give it a try.

I don’t want to close this thread yet, maybe there is a more elegant way? I mean without authentication request conversion code snippet, it is kind of half-measure only in Postman 🙂
