Access API machine to machine

I am writing a script to access the API and update contacts. Obviously there is no user involved (it will run from cron) so I need an access token without using a user grant.

However I cannot find anything that alows me to do so. The only thing I have found is ths so-called tutorial that has no code example and indicate I might need to fudge a user acces token and use the refresh endpoint. it’s really not clear and I dohope I don’t have to do that faffing about :slight_smile:

https://developer.infusionsoft.com/tutorials/making-oauth-requests-without-user-authorization/#introduction

Can I just get an non-expiring access token for the api? Is there a managment API I should use to get tokens?

Thanks

Steve

Better - just point me to a working example - just the HTTP traffic will be fine. I’m guessing you must have one as this is surely a FAQ?