OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM How to create contacts from third party form?

This topic contains 3 replies, has 2 voices, and was last updated by  dzakharov 6 years, 7 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #30640

    kusum.gupta
    Participant

    Hi,

    I have an installation of orocrm 2.0.

    I created a third party form to create contact in orocrm. As many doc available to generate api key

    and wsse authentication and i done these .

    But i want to create contacts in orocrm from a third party form and code is here to do this-

    This gives error-

    I don’t understand how to do this. Please give me any suggestion.

    Thank you in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #30641

    kusum.gupta
    Participant

    Sorry there ware some mistake in my code. Here is the correct code-

    This gives an error-

    jquery.min.js:6 OPTIONS http://localhost:8000/api/rest/latest/contact 401 (Unauthorized)

    custom.php:1
    XMLHttpRequest cannot load http://localhost:8000/api/rest/latest/contact. Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost’ is therefore not allowed access. The response had HTTP status code 401.

    #30642

    dzakharov
    Participant

    Hi, if you want to create new users, you must use “api/rest/latest/user” or “api/rest/latest/users” for many users. More details about API you can read in documentation https://oroinc.com/orocrm/documentation/current/book/data-api

    #30643

    dzakharov
    Participant

    for create new contact try to use “/api/contacts” with data for example:

Viewing 3 replies - 1 through 3 (of 3 total)

The forum ‘OroCRM’ is closed to new topics and replies.

Back to top