ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

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

  • Creator
    Topic
  • #37638

    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
  • #37646

    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.

    #37647
    dzakharov
    dzakharov
    Oro Core

    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://www.orocrm.com/documentation/current/book/data-api

    #37656
    dzakharov
    dzakharov
    Oro Core

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

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

You must be logged in to reply to this topic.