Android Question [solved] Json file password

Almog

Active Member
Licensed User
Hello,

I tried to use OkHttpUtils2 with json,
the file adress have a key/password to get to the data.
I used j.password =
but The Log result is:
"ResponseError. Reason: Unauthorized, Response: {"message":"Need to provide a secret-key to READ private bins","success":false}"


Code: Copy
Sub Activity_Create(FirstTime As Boolean)

    Dim j As HttpJob
    j.Initialize("",Me)
    j.Password = "********************"
    j.Download("*********************")
    Wait For (j) JobDone(j As HttpJob)
    If j.Success Then
        Log(j.GetString)
    End If
    j.Release

End Sub

Does anybody know how to solve that?

Thanks in advance.
 
Code: Copy
j.Download2(SomeURL, Array As String("password", PASSWORD))

Thanks,

But still get the same result.. (
"ResponseError. Reason: Unauthorized, Response: {"message":"Need to provide a secret-key to READ private bins","success":false}" )


Code: Copy
Dim j As HttpJob
    j.Initialize("",Me)
    j.Password = "****************"
    
    j.Download2("****************",Array As String("password", j.Password))
    Wait For (j) JobDone(j As HttpJob)
    If j.Success Then
        Log(j.GetString)
    End If
    j.Release

Thanks in advance.
 
Upvote 0
Different issue solved with:

Code: Copy
Dim j As HttpJob
    j.Initialize("",Me)
    j.Download("xx") '
    j.GetRequest.SetHeader("secret-key", "xx")
    Wait For (j) JobDone(j As HttpJob)
    If j.Success Then
        Log(j.GetString)
    End If
    j.Release
 
Upvote 0
Back
Top