8 Replies Latest reply on Oct 12, 2018 11:03 AM by Ashif Sayyad

    Unable to access the PI Web API Using Ajax Call

    Ashif Sayyad

      Hello ,

      Developed web application where making ajax call to PI Web API as below. PI Web API configuration is set to basic authentication, hence I am passing credentials as required.

      api.pngEugene Lee

      Here I tried by adding headers also like:





      'Access-Control-Allow-Methods':'GET, POST, PATCH, PUT, DELETE, OPTIONS'


      But I got the this kind of response :



      Here is my Pi configuration :



      Please suggest for same.



      Now I Made the changes and this is a new server machine still the same error occured... please Help.

      "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 401."


      Programming in PI Web APILearn PIPI Developers Club