The state is provided by 3CX when doing the authorization. Most probably the app you created in Salesforce is not following the guidelines described here. Please ensure that you're following that guide to the letter, with every permission exactly as described.