This article will explain how to import access to your python API wrapper.
This access are required to realize the different operation on your Adobe Audience Manager account.
The process to create the text file and import it in the API is important as you would need to repeat that if you have different account to manage.
Getting the required information
As explained in the introduction, you cannot create the access on your own. You need to ask Adobe to provide you the different user access to connect to the Adobe Audience Manager API.
The information that is provided from Adobe should contain the following :
On top of that, you would need to have your partnerName, which is usually the name of your company.
Creating the TXT file
What you would need to do after retrieving these information is to create a text file with these information.
These information need to be stored line by line:
clientID = ‘YourClientID‘
clientSecret : “YourSecrets“
username = “YourUsername“
password = ‘Password‘
I set on red the different elements that are required for you to have in this your file.
The python script will look for the different elements that you see in red and the value in quote (simple or double quotes, doesn’t matter) that is associated with it.
Importing the access
Once you have created this text file, you would need write your first lines of code with this API to import those information.
Let’s imagine that you have set this module in a python “Lib” folder (what I would recommend), then you need import this library and call the ImportAccess method, just like this :
Verifying the import
A simple way to verify the import of your access is to realize this line :
This should return you the information you have imported.
What if I don’t need change account regularly?
If that is the case, this kind of method is not very friendly because you would need to import those information each time you want to use this library.
If you want to avoid doing that, you just need to set those information in the module directly.
On the top of the module, there are the lines that would need to be changed. It should really stay between the line 15 and 25.
On this series, you may want to read those other articles :
|Introduction & Requirements to AAM API||What is to know about the Adobe Audience API with Python|
|importAcess method||How could you use this API wrapper with multiple accounts|
|returnAudienceData method||The most important method of all, retrieving the data from Adobe Audience Manager|
|The AudienceManagerData Class||Discover how this wrapper helps you to handle the data you have retrieved.|
|importTraits and importSegments method||See how you can upload the data to Adobe Audience Manager through this API.|