What is the difference between a client_id and a synServiceId?


Figure 1: AdSense API Relationships
The entities in the AdSense API and how they and how they are linked together.


Some requests, such as AdSenseForContent's generateAdCode request, have a parameter called synServiceId. Often developers are confused as to what this parameter is and if the client_id header is required for calls that ask for a synServiceId. The answer is that you need both of these values when sending the request. Though you can use the same value for these arguments, the difference is in how the AdSense API service uses these values. Figure 1 provides a graphical representation of how client_id and synServiceId parameters are used.

The client_id header is used to determine if there is an association between your developer account and the account to which the client_id belongs. This means you can use any ID (AFS, AFC, or AFR) belonging to the client publisher's account for any request. For example, you could use the AdSense for Search ID as the value for client_id when making requests to the AdSense for Content service. The synServiceId is used to look up the publisher client's account for that service. This means that you must use the client publisher's AdSense for Content ID as the synServiceId when making calls to the AdSense for Content service.
Main menu
5537927048054301678
true
Search Help Center
true
true
true
false
false