Friday, 25 August 2023
  3 Replies
  382 Visits
  Subscribe
Hi, I am getting wrong return in GET code. Why might the problem be caused? Thank you

Curl Response (Work);

curl --request GET https://auth.tesla.com/oauth2/v3/authorize

{
"error": {
"message": "Missing required parameter: response_type",
"code": 400,
"reason": "AuthorizationError",
"referenceID": "e47b7882a1d240fd91a55ac5d89404c8-1692973972232"
}
}


oHTTP2 Response (Not Work);

oHTTP2 := TsgcHTTP2Client.Create(nil);
oHTTP2.TLSOptions.IOHandler:=iohOpenSSL;
oHTTP2.TLSOptions.Version:=tls1_3;
oHTTP2.TLSOptions.OpenSSL_Options.LibPath:=oslpCustomPath;
oHTTP2.TLSOptions.OpenSSL_Options.LibPathCustom:=appdir;
oHTTP2.TLSOptions.OpenSSL_Options.APIVersion:=TwsOpenSSLAPI.oslAPI_1_1;
res:=oHTTP2.Get('https://auth.tesla.com/oauth2/v3/authorize');

'<HTML><HEAD>'#$A'<TITLE>Access Denied</TITLE>'#$A'</HEAD><BODY>'#$A'<H1>Access Denied</H1>'#$A' '#$A'You don''t have permission to access "http://auth.tesla.com/oauth2/v3/authorize" on this server.<P>'#$A'Reference #18.15b4afc3.1692974824.4e110df7'#$A'</BODY>'#$A'</HTML>'#$A