Get oAuth2 token based on Authorization Code

mihai.valcea
Member Posts: 95
Hi,
I'm using a NAV routine to get Authorization code (oAuth2 protocol).
How can I convert this authorisation code into Token used further for API requests ?
The authorisation code is available in next context:
1. in browser there is a callback like this: https://localhost/v1/callback?code=45a2bb54a665a4e9193eb662c5751dffd65e9ee40c823debaaaa716fd79ecf68
2. in response content is like this:
<path d="M43.875 5.37327C43.875 2.54484 41.6154 0.25 38.8258 0.25C37.2459 0.25 35.837 0.987934 34.9103 2.14009L34.9084 2.13816L16.7115 24.8158L8.88268 16.2132L8.87889 16.2171C7.95606 15.2036 6.64012 14.5659 5.17421 14.5659C2.38477 14.5639 0.125 16.8567 0.125 19.6872C0.125 21.0282 0.637698 22.2439 1.46749 23.1572L1.46369 23.161L13.2421 36.1026L13.2459 36.0988C14.1687 37.1122 15.4847 37.75 16.9506 37.75C18.5304 37.75 19.9394 37.0121 20.866 35.8599L20.8679 35.8618L42.7428 8.60646L42.7409 8.60453C43.4492 7.724 43.8745 6.59882 43.8745 5.37342L43.875 5.37327Z" fill="white" transform="translate(28, 32)"/>
It seems that Postman has some conversion mechanism to convert the authorization code into Token.
Is possible to have the Token directly in NAV or I need to use Postman for every token generation ?
Regards,
Mihai
I'm using a NAV routine to get Authorization code (oAuth2 protocol).
How can I convert this authorisation code into Token used further for API requests ?
The authorisation code is available in next context:
1. in browser there is a callback like this: https://localhost/v1/callback?code=45a2bb54a665a4e9193eb662c5751dffd65e9ee40c823debaaaa716fd79ecf68
2. in response content is like this:
<path d="M43.875 5.37327C43.875 2.54484 41.6154 0.25 38.8258 0.25C37.2459 0.25 35.837 0.987934 34.9103 2.14009L34.9084 2.13816L16.7115 24.8158L8.88268 16.2132L8.87889 16.2171C7.95606 15.2036 6.64012 14.5659 5.17421 14.5659C2.38477 14.5639 0.125 16.8567 0.125 19.6872C0.125 21.0282 0.637698 22.2439 1.46749 23.1572L1.46369 23.161L13.2421 36.1026L13.2459 36.0988C14.1687 37.1122 15.4847 37.75 16.9506 37.75C18.5304 37.75 19.9394 37.0121 20.866 35.8599L20.8679 35.8618L42.7428 8.60646L42.7409 8.60453C43.4492 7.724 43.8745 6.59882 43.8745 5.37342L43.875 5.37327Z" fill="white" transform="translate(28, 32)"/>
It seems that Postman has some conversion mechanism to convert the authorization code into Token.
Is possible to have the Token directly in NAV or I need to use Postman for every token generation ?
Regards,
Mihai
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions