Android Question [solved] Json file password

Discussion in 'Android Questions' started by Almog, Sep 14, 2018.

  1. Almog

    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:
    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.
     
  2. Jamie8763

    Jamie8763 Active Member Licensed User

    Code:
    j.Download2(SomeURL, Array As String("password", PASSWORD))
     
  3. Almog

    Almog Active Member Licensed User

    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:
    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.
     
  4. Jamie8763

    Jamie8763 Active Member Licensed User

    Different issue solved with:

    Code:
    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
     
  5. Almog

    Almog Active Member Licensed User

    Thank you..
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice