Getting 403 Forbidden

762 views
Skip to first unread message

sa...@nmpilondon.com

unread,
Jul 6, 2016, 11:00:19 AM7/6/16
to Google's DoubleClick Campaign Manager API Forum

I am downloading reports in DCM. I am successfully able to update/get/download reports that have been created by my users id via API. In my office there are a few people using the interface and create reports.

When trying to access the reports via API  that are not created by my user id, I get the error "403 Forbidden",

In the UI My user id has been given access by the Admin to access other users reports. When in the DCM UI,  I am able to see reports from other users . But via APi, I am unable to update/get/download the report.

Can someone please help ?

Regards

Puneet

pun...@nmpilondon.com


Vu Chau (DCM API Team)

unread,
Jul 6, 2016, 12:44:37 PM7/6/16
to Google's DoubleClick Campaign Manager API Forum, sa...@nmpilondon.com
Hi Puneet,

Is the 403 being thrown consistently?  Could you try the executions again at a later time to see if it is working?

Otherwise, you might want to create a new client ID and provide a fresh client_secrets.json to your API client.

Vu Chau
DCM API Team

sa...@nmpilondon.com

unread,
Jul 13, 2016, 11:16:35 AM7/13/16
to Google's DoubleClick Campaign Manager API Forum, sa...@nmpilondon.com
Hey Vu,
Thanks for the reply. Sorry for the delay.
We have multiple users, and the user Id I am using has been granted admin access on DCM.
I am able to access all reports that I have crated, but not of other users , even though having admin rights.

And yes its always 403 when trying to access reports that are not created my my id ?

I have done that by creating a new client Id, with new credentials, but still the same.

We have another class running for certain fixed reports, that uses an Web application credential, where as I am using a Service account client credential

I look forward to hear from you.

Lakshmi(DCM API Team)

unread,
Jul 13, 2016, 5:16:06 PM7/13/16
to Google's DoubleClick Campaign Manager API Forum, sa...@nmpilondon.com
Hi,

If you want to access all the reports, you need to use domain-wide authority delegation to the service account. But, this would only work if all the profiles were linked to Google accounts on an apps domain that you own. 

Alternatively you might want to try the view/modify all report permissions to the user role. 

Thanks,
Lakshmi, DCM API Team

pa...@nmplondon.com

unread,
Jul 22, 2016, 2:14:23 PM7/22/16
to Google's DoubleClick Campaign Manager API Forum, sa...@nmpilondon.com
Hi Lakshmi

Using the API's explorer, we are able to access the report data (can successfully call dfareporting.reports.get). However, we don't have update access.

Running dfareporting.reports.update in the API's Explorer returns:

 

403 Forbidden

 
- Show headers -
 

{
 
"error": {
 
"errors": [
   
{
   
"domain": "global",
   
"reason": "forbidden",
   
"message": "Forbidden"
   
}
 
],
 
"code": 403,
 
"message": "Forbidden"
 
}
}

 

https://developers.google.com/apis-explorer/?hl=en_US#p/dfareporting/v2.5/dfareporting.reports.update?profileId=
[etc...]

As far as we can tell, we have full read/write permissions across the entire targeted account.

Are we missing something?

Thanks

Paul

Lakshmi(DCM API Team)

unread,
Jul 22, 2016, 5:13:40 PM7/22/16
to Google's DoubleClick Campaign Manager API Forum, sa...@nmpilondon.com, pa...@nmplondon.com
Hi Paul,

 Is this report owned by a person who no longer has access to the system? Please double-check if you have any filters on your profile? According to this document, under Modify All saved reports it is specifically mentioned that "Users with filters applied to their profiles will only be able to view and select objects that they have permission to access when running a report".

If everything with UI permissions and roles are fine, please send me the sample JSON request and response along with account id and profile id (in a private message). To send a private message, you need to click the drop-down next to the reply button on the right. You will see reply privately to author, click on that and send me the files. Note that the Reply to author option is visible only to the group members.

Thanks,
Lakshmi, DCM API Team

gm.digi...@dentsuaegis.com

unread,
Jan 30, 2017, 9:38:28 AM1/30/17
to Google's DoubleClick Campaign Manager API Forum, sa...@nmpilondon.com
Hi, I am trying to access dfareporting api using powershell.  My account has all the authorization it needs.  However, when I run it, I get 403 error. Thank you for your help.


$tag = Invoke-RestMethod `
-Method GET `
-Uri $uri `
-Headers @{Authorization = Get-Token} `


Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
$tag = Invoke-RestMethod `
+        ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke 
   -RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRe 
   stMethodCommand
Message has been deleted

Lakshmi(DCM API Team)

unread,
Jan 30, 2017, 3:00:54 PM1/30/17
to Google's DoubleClick Campaign Manager API Forum, sa...@nmpilondon.com
Hi,

Could you please double check if you have logged in as a different user than the one you used to make the requests via API? If not, please send the DCM account id, sample request, response in JSON format and profile id in a private message.

Thanks,
Lakshmi, DCM API Team

Reply all
Reply to author
Forward
0 new messages