Hello to all
I am developing a software for hotels and to be able to manage the database. The first thing I have to do is to ask for authorization to the database and when I have it I get back a key.
So far I have not been able to access from my software, but from Postman I can access without problem.
In my software I have the following code and it always returns me that I am not authorized, I don't know if you can help me. Here is what I do and the code from postman that works.
thank you very much
I am developing a software for hotels and to be able to manage the database. The first thing I have to do is to ask for authorization to the database and when I have it I get back a key.
So far I have not been able to access from my software, but from Postman I can access without problem.
In my software I have the following code and it always returns me that I am not authorized, I don't know if you can help me. Here is what I do and the code from postman that works.
thank you very much
Codigo:
'Data send for Postman Program***************************************************************************************
' curl --location --request POST 'DireccionIpServidor/oauth/v1/tokens'
' --header 'Content-Type: application/x-www-form-urlencoded'
' --header 'x-app-key: 5171faa3-5308-49e9-aaaa-babbec18d478'
' --header 'Authorization: Basic ZGVzYXJyb2xsb3F1aWNraW5fQ2xpZW50OktEMjIyRkU2cF9yak9iRy03Tld6QUNw'
'Body*********************
' --data-urlencode 'username=OHIPSB_QUICKIN'
' --data-urlencode 'password=Ly}bYD7$7l/U6/e7V#BFd'
' --data-urlencode 'grant_type=password'
'End Body****************
'End Postman******************************************************************************************************
j.Initialize("", Me)
j.Download(DireccionIpServidor & "/oauth/v1/tokens")
j.GetRequest.SetHeader("x-app-key","5171faa3-5308-49e9-aaaa-babbec18d478")
j.GetRequest.SetHeader("Content-Type","application/x-www-form-urlencoded")
j.GetRequest.SetHeader("Authorization","Basic ZGVzYXJyb2xsb3F1aWNraW5fQ2xpZW50OktEMjIyRkU2cF9yak9iRy03Tld6QUNw")
j.Username="desarrolloquickin_Client"
j.Password="KD22E6p_rjObG-7NWzACpK"
j.PostString(DireccionIpServidor & "/oauth/v1/tokens","username=OHIPSB_QUICKIN&password=Ly%7DbYD7%247l%2FU6%2Fe7V%23BFd&grant_type=password")
Log(DireccionIpServidor & "/oauth/v1/tokens")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then