Announcements
Hello All members,
I am working on one mobile application(both iOS and Android in native code). In this there is functionality of login with Dynamics 365 and get contacts from it. In this I have used OAUTH2.0 library to implement login functionality. Login is working fine. Next, I want to fetch contacts from Dynamics 365 using API. So I am following below documentation link:
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/contact?view=dynamics-ce-odata-9
In mobile app, I am not getting any responce when I call this API. Also there is no error.
When I try to call [organization URI]/api/data/v9.0/contacts from my computer browser then it gives me contacts after login.
So can you please help me regarding do I need to pass any token/authorizationCode/header parameters etc while calling this API from mobile app? In documentation they didn't mentioned anything regarding which things I need to pass while calling contact API.
Also I am not sure if I must have to use its mobile SDK to implement this feature rather then normal API call?
Thanks in advance.
Hello @Dharani, Thanks for your reply. I checked the links you shared but its in different technology, so I am not able to understand it well. So I am now trying it with POSTMAN collection. Please check my last comment I added. So you will have better idea regarding my issue and error.
Hello @Terrance, thanks for the help. Yes I seen this code but its in C# and I am iOS mobile developer so not able to execute it in C#.
I am trying to call get contacts API in postman using the way mentioned in documentation but I am getting webpage code in response. If API will star working in postman then I can easily integrate it in my iOS app.
I am referring this link for postman setup: docs.microsoft.com/.../setup-postman-environment
This is screenshot of my postman collection error: https://tinyurl.com/y5k6pm47
This is screenshot of variables I set in postman: https://tinyurl.com/y68z6zbm
So can you please help me to execute this get contact API in postman. I am not sure if I am passing wrong value of any parameter or the issue is something different.
You can also refer the following links, a bit add-on to Dharanidharan's answer.
https://msdn.microsoft.com/en-us/library/mt742432.aspx
https://jlattimer.blogspot.my/2015/11/crm-web-api-using-c.html
--
Terrance
CRM Admin | Microsoft 365 E5
The key difference lies in authentication. When we use scripts and execute from within Dynamics CRM using webresources, the authentication is automatically passed and we do not have to supply the authentication token header there.
But when we are connecting from outside of CRM context, it is important to authenticate the access credentials before they can connect and perform actions in Dynamics CRM.
Please refer the below link. It will help you to understand how we need to authenticate the CRM using the access token.
Regards,
Dharani
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,807 Super User 2024 Season 2
Martin Dráb 229,135 Most Valuable Professional
nmaenpaa 101,156