Got it

Call OpenAPI Local (Javascript and Node.JS)

Latest reply: Apr 28, 2019 04:31:38 994 3 1 0 1

!Important: Since certificate is self signed and not issued by the CA, POST method must be executed on a NODE.JS server to bypass SSL


Step1. Download NODE.JS

https://nodejs.org/dist/v10.15.3/node-v10.15.3-x86.msi


Step2. Install

Install the file above.


Step3.

Download the demo project attached (apiJS)


Step4.

Unzip it


Step5.

Change directory to root folder in cmd

214007eskmupppr3pbopbp.png?image.png


Step6.

Open CMD and run "npm install"

214151m8lo8pjbfpnkll1n.png?image.png


Step7.

run "node ." (!it's space between node and the dot)

This command will start the mini server.

If the computer is restarted, the command must be executed again.

214309xsfi1zii1iixbpls.png?image.png


Step8.

Access the domain:

localhost:3000

064442amg6g2g6m5qn3n2n.png?image.png

214614a2hq32ii3wqbq1c4.png?image.png


The Token is the openApiroarand.

With this key you can continue your project as you want.

064224geft9yztofe2u01a.png?image.png

Please read again the note at the top :)

This article contains more resources

You need to log in to download or view. No account? Register

x

Thanks for the help¡¡

However, following your instructions I've managed to get the token, but when I tried to continue, getting the plantLists I've always got a errorMsg 200. I think this error is "Permission verification failed". Is there something else I have to do? Could you give me a hint? Thanks in advance
View more
  • x
  • convention:

Posted by pedestre at 2019-04-19 10:36 Thanks for the help¡¡However, following your instructions I've managed to get the token, but when ...
Exactly Same what is happening hear token is retrieved by error 200 if I query any plant data or other data. So, We cannot use it. I tried with many languages nothing is working. Really after more than 10 years creating and consuming web API this is the worst one ever . I tried to contact our management to stop working with Huawawei on the future to avoid such issues
View more
  • x
  • convention:

Jack_Wang
Jack_Wang Created Sep 10, 2019 08:43:24 (1) (0)
I have a solution for my similar problem withopenApi {errorMsg=200}. It was Cookie issue.
Interface instructions in NetEco Open interface 1.11 say - "Keep the seccsion id in cookie"

In my code it works:
1. get Cookie from /openApi/login response call,
2. trim cookie to keep only string with JSESSIONID=nodexxxxxxxxxxxxxxxxxxxxxx.nodex
3. use coockie in next OpenApi calls  

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.