SOLVED

REST API - Invalid token

Go to solution
Anonymous
Not applicable

REST API - Invalid token

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.

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Kenny_Elkington
Marketo Employee

Re: REST API - Invalid token

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

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Re: REST API - Invalid token

This has to do it with the access token expiring. To fix the error, regenerate the token.
Anonymous
Not applicable

Re: REST API - Invalid token

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.
Anonymous
Not applicable

Re: REST API - Invalid token

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
Marketo Employee

Re: REST API - Invalid token

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

View solution in original post

Anonymous
Not applicable

Re: REST API - Invalid token

Thanks Murtza. Very helpful.