Bonjour

Je dois créer une requête d'authentification et j'ai besoin de vos conseils pour y arriver

Voici ce qui est demandé

Creating a User SID (session Id) Using the JSON Authentication Service PrintModified on: Mon, 29 Aug, 2022 at 11:05 AM


Execute the POST call below:


https://app.quotemedia.com/auth/p/authenticate/v0/


Set content type to "application/json" by having this in the HTTPS header:


Content-Type: application/json


and the request body should look like this, adding valid user credentials in the body like in example below:


{


"wmId":"123456",


"username":"test",


"password":"test01"


}




where WMID is 123456, username is test and password is test01.


Sample CURL command:


curl -v -H "Content-Type: application/json" -d "{ \"wmId\": 123456, \"username\": \"test\", \"password\": \"test01\" }" https://app.quotemedia.com/auth/p/authenticate/v0/


Upon a successful login, the above call returns JSON as such:


{


"@c" : ".AuthenticateResponse",


"code" : {


"value" : 0,


"name" : "Ok"


},


"sid" : "ac9b4161-f608-4079-bf58-6d8055a6750c"


}
Mon code débute par

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
Sub try1()
 
        Dim postReq As HttpWebRequest = DirectCast(WebRequest.Create("https://app.quotemedia.com/auth/p/authenticate/v0/"), HttpWebRequest)
        postReq.ContentType = "application/json"
        postReq.Method = "POST"
        postReq.Credentials = ???
 
 
 
 
 
 
    End Sub
Pour la suite je galère
Merci de vos suggestions