create platform logic and save/update access token to db