SOLVED

REST API Authentication returns 401

Go to solution
orchid001
Level 1

REST API Authentication returns 401

Hi All,

I am trying to get the access token via API from the documentation https://developers.marketo.com/rest-api/authentication/

Been checking my client id and secret, all seems to be working when doing the OAuth 2 via Postman, but this expires so I need to get it via API but gives me error like below. 

Does anyone know what am I missing?

Thanks in advance.

2020-04-20_16-59-44.png

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: REST API Authentication returns 401

Your request structure looks right, though I wonder what those other 6 headers are. You don't need any special headers along with the token GET request.

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: REST API Authentication returns 401

Your request structure looks right, though I wonder what those other 6 headers are. You don't need any special headers along with the token GET request.

orchid001
Level 1

Re: REST API Authentication returns 401

It is working now, when you point out the headers I tried checking it, the 6 header are actually auto-generated in postman when I tried the request, and I unchecked those which gives me error 401 as I thought they are not needed as it wasn't in the documentation, now I turn it back to checked all items in header and it is now successful.

Thank you!

2020-04-21_17-17-49.png