Hello Danial, Really thanks for your time.As you said in your earlier post that i just need to have a gmail id for creating and using the sandbox adwords account. The credential which i need to put in the auth.ini files are emailid,password,useragent which is just a simple string,application token which i put as ignored,developers token which is my emailid+ +currency code i put when creating the account,and the authtoken.
I have applied this code to get the authtoken .Can you please check whether this process for obtaining the code is correct or not.will this process will return me a valid authtoken.Here it is.. <?php // Get authorisation token $auth_url = 'https://www.google.com/accounts/ClientLogin'; // Setup data to pass to Google $data = array( 'accountType' => 'GOOGLE', 'Email' => 'mccprimali...@gmail.com', 'Passwd' => '************', 'source'=> 'primamcc-keyword-tool', 'service'=> 'adwords'); // Try to fetch the authorisation code from Google $curl = curl_init($auth_url); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); $authorisation_code = curl_exec($curl); // Close the curl connection curl_close($curl); // Create the authorisation codes $authorisation_codes = explode("\n", $authorisation_code); $authorisation_code = array(); print $authorisation_code['SID'] = str_replace('SID=', '', $authorisation_codes[0]); print $authorisation_code['LSID'] = str_replace('LSID=', '', $authorisation_codes[1]); print $authorisation_code['Auth'] = str_replace('Auth=', '', $authorisation_codes[2]); ?> what you said in your earlier post i have done that exactly but still i get the same error.so i thought of showing you the code i have used to get the auth token.please check.i have used just a gmail id to get the auth token, and i have put the same credentials in auth.ini file.and made my first request using the GetAllCampaigns.php from the example the liabary provides.But still i get the same error.can you please say me why this is happening? i am really getting frustrated.can you please suggest me what i can do to overcome this problem ? please i relay need your help.please. Please provide me a step wise rquirement i need to do to make the adwords api work properly.please suggest. On Nov 11, 7:03 pm, "AdWordsAPIAdvisor" <adwordsapiadvi...@google.com> wrote: > Hello Moinak, > > You need both MCC and usual accounts: MCC for API token management and > normal account for ad serving. > > Please don't confuse Production and Sandbox environments: > > For production you need both MCC account and advertiser accounts created. > The MCC and client account ids assigned on account creation. In production > you need to specify your MCC account login and password for authorization > and your advertisers account id as clientCustomerId. Those accounts need > to be linked. > > For sandbox account you initially need just one Google account (like > gmail.com account), the advertiser accounts will be created for you > automatically on sandbox initialization. For it, you need to specify your > account login and password for authorization, leave clientEmail and > clientCustomerIds fields empty and send a get request to the > CampaignService. > > After that, most subsequent requests need to have clientCustomerId > specified. You can retrieve your account hierarchy via > ServicedAccountService to find out ids for client accounts created. Please > see example in one of our client libraries. > > Best regards, > Danial Klimkin, AdWords API Team. -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en