Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to send input value throw freshdesk api? Need help asap #76

Open
mafioznick opened this issue Apr 16, 2022 · 1 comment
Open

How to send input value throw freshdesk api? Need help asap #76

mafioznick opened this issue Apr 16, 2022 · 1 comment

Comments

@mafioznick
Copy link

mafioznick commented Apr 16, 2022

i need help, how send form input value throw this freshdesk api.. what i need to change, to insert input id in ticket_data as value.. please help

<input id="lc-calendar_till" type="hidden" placeholder="Date from">


<script>
$(document).ready(function(){
    $("button").click( // click to send
      function() {
        var yourdomain = 'domainxxxx'; 
        var api_key = 'apikeyherexxx'; 

 

 ticket_data = '{ "description": "here is description", "subject": "Subject text", "email": "[email protected]", "priority": 1, "status": 2 }';
  

        $.ajax(
          {
            url: "https://"+yourdomain+".freshdesk.com/api/v2/tickets",
            type: 'POST',
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            headers: {
              "Authorization": "Basic " + btoa(api_key + ":x")
            },

            data: ticket_data,
            
          }
        );
      }
    );
});



</script>
@mafioznick mafioznick changed the title How to send input value throw freshdesk api How to send input value throw freshdesk api? Need help asap Apr 16, 2022
@mafioznick
Copy link
Author

any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant