Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Unable to Authenticate Against Analytics API in OAuth Playground

Avatar

Level 1

I attempted to follow the directions found at  3-Legged Authentication using Google OAuth Playground because I am having trouble getting data back from my PHP app's POST request. I was getting all 400 Bad Request errors when trying to hit the version 1.4 endpoints. So I followed the steps on that tutorial page exactly, and I receive this as a response:

HTTP/1.1 401 Unauthorized Via: HTTP/1.1 GWA Xserver: www440 X-google-cache-control: remote-fetch Vary: x-api-uri-scheme Server: Apache/2.4.2 Cache-control: no-cache Access-control-allow-credentials: true Date: Wed, 15 Oct 2014 19:13:53 GMT Access-control-allow-origin: * Access-control-allow-headers: X-WSSE, X-WSSE-APPLICATION, ACCEPT, AUTHORIZATION, ORIGIN Content-type: application/json Www-authenticate: WSSE realm="Omniture REST Api", profile="UsernameToken" { "error": "Invalid authentication credentials." }

I tried with and without adding the X-ADOBE-DMA-COMPANY header. I believe that I followed the steps correctly.

Also, if I change the 1.3 in the URL in OAuth Playground to 1.4, the error is a 400 Bad Request.  I think it would be better if my code uses the 1.4 version, but I can't get that to work at all. Any help as to why I'm getting 401 for v1.3 and 400 for 1.4 would be greatly appreciated.

1 Accepted Solution

Avatar

Correct answer by
Employee

I'm not sure why you would be getting these 401 errors exactly. But I have found Postman to be most useful when testing the 1.4 api. The steps here have been most helpful for me in setting up an environment to test the 1.4 API analytics-1.4-apis/postman at master · AdobeDocs/analytics-1.4-apis · GitHub

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

I'm not sure why you would be getting these 401 errors exactly. But I have found Postman to be most useful when testing the 1.4 api. The steps here have been most helpful for me in setting up an environment to test the 1.4 API analytics-1.4-apis/postman at master · AdobeDocs/analytics-1.4-apis · GitHub