Thu Nov 28 2024 10:11:15 GMT+0000 (Coordinated Universal Time)
This page provides instructions on how to integrate Acquia as a first-party domain with your website for the following scenario:
IT technicians can use the following tasks to set up a service user with a protected token, securely send data to CDP, accomplish marketing strategy campaigns, and generate insightful analytics reports.
The following diagram depicts the process flow for using the webtag service:
The following checklist lists the tasks for using the webtag service:
S. No | Task |
---|---|
1 | Sign in to the CDP user interface |
2 | Create a user role through the Integration Management UI instances |
3 | Create a Token Retrieve request using Postman |
4 | Selecting the webtag version for CDP: |
Click Integrations > Instances.
If the Instances tab is not visible, your account does not have the required role. To get access, contact your CDP administrator.
Click Add Instance.
The system displays the Create Instance page.
In Name, enter the name for your instance.
For example, Acquia_API_Webtag.
In the Instance Type field, select DW Tracker
to push upstream payloads from a source system to CDP.
Click Save.
The system system creates the instance and auto-populates values in the following fields:
API Host URL
Authentication Host URL
UserName
Password
If you forget your tracker password, regenerate the credentials and ensure that they are not used elsewhere.
Take a backup of the following credentials at a secure location as you cannot view them in the system again:
UserName
Password
These credentials are used when creating a user role through Postman.
Complete the following steps to create a Token Retrieve request using Postman:
Download and open Postman.
Click Create Collection.
Click the Ellipsis icon, click Rename, and then rename the folder collection to CDP Authentication.
In the CDP Authentication collection, click Add a request.
Change the request to POST
.
Modify the endpoint URL parameter of the Authentication mechanism from /authentication
to /token
.
Enter the following in Query Params to be added to the URL:
scheme
, Value: a1webtag
Key: action
, Value: create
The system adds the parameters to the URL:
https://auth.agilone.com/token?scheme=a1webtag&action=create
The following are the URL parameters:
Cloud Region | URL Endpoint | Parameter Description |
---|---|---|
AWS | auth.agilone.com |
|
Click the Authorization tab and select the Type as Basic Auth.
Enter the username and password.
Postman recommends that you save all sensitive information into variables. For more information, visit Store and reuse values using variables. If you cannot set up variables, delete the sensitive information and re-enter the credentials each time you need, so that you can conduct tests to avoid security risks.
Click the Headers tab.
Add Key as Content-Type and Value as application/json.
Click Save and click Send.
For successful requests, Postman displays Status: 200 OK and access_token.
You can initiate the user authentication step only after creating a token. You can use the token until it expires. You must not resend the request for continued testing with the generated token.
Click the Ellipsis icon and click Duplicate to make a copy of the Step 1 - Authenticate with Username and Password (One Time) authentication request.
Change the request to GET
.
Click the Authorization tab and select the Type as Basic Auth.
If the request was duplicated correctly, it must already be pre-populated. Postman recommends that you save all sensitive information into variables. For more information, visit Store and reuse values using variables. If you cannot set up variables, delete the sensitive information and re-enter the credentials each time you need, so that you can conduct tests to avoid security risks.
Click the Headers tab.
Add Key as Content-Type and Value as application/x-www-form-urlencoded.
Click Save and click Send.
For successful requests, Postman displays Status: 200 OK and access_token.
Ensure to check the expiration date of the token on a regular cadence through GET request calls. The expires_in
field in the response body indicates the lifespan of the token. By default, tokens last 90 days in Customer Sandbox (CS) and 180 days in UAT and Production (PROD) environments.
The response body consists of the following parameters:
Parameter | Description |
---|---|
access_token | A unique string that serves as a token for accessing protected resources. In this case, "f265e508-c599-44e3-ab60-60a040a9154a" is the token that the API returns. You must include this token in the header of subsequent requests to access authorized resources. |
token_type | The type of token that is issued by the server. In this example, the token type is "bearer" , which means that the bearer of this token has the authorization to access the resources. Bearer tokens are a common method used in OAuth 2.0 for accessing resources. |
expires_in | The lifetime of the access token in seconds. Once this time elapses, the token expires and no longer grants access. In this case, 15600000 seconds means the token has a significant duration before expiration. |
If this content did not answer your questions, try searching or contacting our support team for further assistance.