Already I have generated keys and access authorization header needed to make the request.
But I do not know how to do this using Http request !
I try this:
B4X:
Dim request As HttpRequest
MainUrl = "https://api.twitter.com/1/statuses/update.json"
request.InitializeGet(MainUrl)
request.SetHeader("Authorization" , Header)
MainRequestId = 1
HttpClient1.Execute(request, MainRequestId)
Header contains the Authorization header. But the result is unauthorized code 401.
this header is entirely correct. I think the problem is the way I'm doing this request. Could someone give me a hand?
I'm confused on how to generate this request. I tried the HttpClient.ExecuteCredentials , but also not worked. In the case of HttpClient.ExecuteCredentials the username and password need to be encoded?
Would you like an example with some more details. My header is identical to that reported by Twitter. It's not wrong !
The response is always Unauthorized. My code is correct with respect to add the Header?