REST API - Invalid token | Community
Skip to main content
February 11, 2015
Solved

REST API - Invalid token

  • February 11, 2015
  • 4 replies
  • 6419 views

Hello - 

I have recently started dabbling with Marketo REST API and I keep running into invalid token issue.
The token works fine initially and I get valid response back (with accurate data). However, after I run the code a few times, I run into the following message..

[{"code":"601","message":"Access token invalid"}]}

Would be great help to understand why the token becomes invalid after working initially.

Thanks for the help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kenny_Elkington

This answer is not correct.  Token life is always 1 hour.

4 replies

February 11, 2015
This has to do it with the access token expiring. To fix the error, regenerate the token.
February 11, 2015
Thanks Murtza.
Do you know under what conditions the token expires. I am noticing that it expires after a few calls and I do not think regenrating tokens on a frequent basis is a very scalable solution.
February 11, 2015
If you generate token from UI, token expires in an hour. If you generate token from API via auth endpoint, it expires in 24 hours

Auth endpoint:
 http://developers.marketo.com/documentation/rest/authentication/
Kenny_Elkington
Adobe Employee
Kenny_ElkingtonAdobe EmployeeAccepted solution
Adobe Employee
September 30, 2015

This answer is not correct.  Token life is always 1 hour.

February 11, 2015
Thanks Murtza. Very helpful.