I am trying to connect and pull data from a url and I have no idea how to even begin for the login/authentication part. This will pull data from a url via HTTP POST
I was hoping someone here with the correct know how can help me out.
This is what I have from the docs:
It gives some java methods for calculating time, md5 but not sure what do with them.
The signature string is:
How do you convert a image to javascript,? You need to paste code, then someone may help. You may find someone who wishes to waste their time coping it from your image, but you will find more will help if you make life easier for them to help.
Authorization Field calculation example
If the KeyId is: 2424 and the KeySecret is: 6680182547, the following method can be used to
calculate the signature sign
Request:
POST /v1/api/userStationList
Content-MD5: mBAcWORUK93FBOz6jsAuqw==
Content-Type: application/json
Date: Fri, 26 Jul 2019 06:00:46 GMT
Authorization: API 2424: ForAqMkym0v7R94RSU0rRqpEkf0=
Body:{"userId":"1145611319416590338"}
Note: There is no "Body:" in the post content sent
Authorization Calculation
Because Authorization = "API "+ KeyId + ":" + Signa, the final Authorization is “API 2424:
/2Np3q5h846q9cWEFUNtbL+G7H8=”,
Then add the Authorization header to form the final message that needs to be sent:
POST /v1/api/userStationList
Content-MD5: mBAcWORUK93FBOz6jsAuqw==
Content-Type: application/json
Date: Fri, 26 Jul 2019 06:00:46 GMT
Authorization: API 2424:/2Np3q5h846q9cWEFUNtbL+G7H8=
{"userId":"1145611319416590338"}
I am guessing I need to pass those headers above to each request but I have no idea how to calculate them.