Retrieve data from Creatio using OAuth 2.0 authorization and OData 3
To implement the example:
Step 1: Set up the integration of a third-party app with Creatio using Identity Service. Read more >>>
Step 2: Retrieve a Bearer
token. Read more >>>
Step 3: Retrieve data from Creatio. Read more >>>
Retrieve the names of all accounts from the Accounts section. Use OAuth 2.0 authorization and OData 3 protocol to integrate the app with Creatio.
Status: 200 OK
{
"d": {
"results": [
{
"__metadata": {
"id": "http://mycreatio.com/0/ServiceModel/EntityDataService.svc/AccountCollection(guid'405947d0-2ffb-4ded-8675-0475f19f5a81')",
"uri": "http://mycreatio.com/0/ServiceModel/EntityDataService.svc/AccountCollection(guid'405947d0-2ffb-4ded-8675-0475f19f5a81')",
"type": "Terrasoft.Configuration.Account"
},
"Name": "Accom (sample)"
},
{
"__metadata": {
"id": "http://mycreatio.com/0/ServiceModel/EntityDataService.svc/AccountCollection(guid'e308b781-3c5b-4ecb-89ef-5c1ed4da488e')",
"uri": "http://mycreatio.com/0/ServiceModel/EntityDataService.svc/AccountCollection(guid'e308b781-3c5b-4ecb-89ef-5c1ed4da488e')",
"type": "Terrasoft.Configuration.Account"
},
"Name": "Our company"
}
]
}
}
This example uses Postman to test requests.
1. Set up the integration of a third-party app with Creatio using Identity Service
- Set up the Identity Service. Instructions: Set up the Identity Service.
- Set up the OAuth 2.0 authorization. Instructions: Set up the OAuth 2.0 authorization.
- Make sure the Identity Service is running. Instructions: Set up the integration of a third-party app with Creatio using Identity Service (step 3).
2. Retrieve a Bearer token
Instructions: Retrieve a Bearer
token.
You can now integrate third-party apps or web services with Creatio using OAuth 2.0 authorization. Authorize all external requests to Creatio using the Bearer
token.
3. Retrieve data from Creatio
-
Create a request to retrieve data using OData 3.
-
Add a request to the collection. Instructions: Adding requests to the collection.
-
Fill out the request parameters.
Parameter
Parameter description
Parameter value
Request method
GET
Request URL
The URL of the Creatio instance to retrieve data.
http://mycreatio.com/0/ServiceModel/EntityDataService.svc/AccountCollection/?$select=Name
RequestGET http://mycreatio.com/0/ServiceModel/EntityDataService.svc/AccountCollection/?$select=Name
-
Add the request headers.
-
Open the Headers tab.
-
Fill out the body parameters.
Parameter ( Key column)
Parameter value ( Value column)
Accept
application/json;odata=verbose
-
-
Save the request.
-
-
Set up the authorization. Instructions: Retrieve data from Creatio (step 2).
-
Execute the request.
As a result, you will retrieve the names of all accounts. View result >>>