Android Question PostString Coinbase API error

Discussion in 'Android Questions' started by Multiverse app, Nov 9, 2018.

  1. Multiverse app

    Multiverse app Active Member Licensed User

    I've been trying to integrate the Coinbase API in my app for some time now.
    I was able to login and get access key with OAuth using webview.

    I am only having problems Sending money doc:

    curl /
      -X POST \
    'Content-Type: application/json' \
      -H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c' \
      -d '{

    my code:
        Dim CBJobSendPayment As HttpJob:CBJobSendPayment.Initialize("CBJobSendPayment", Me)
    Dim mapjg As Map:mapjg.Initialize
    "to", strAccountID)
    Dim jg As JSONGenerator:jg.Initialize(mapjg)

    "", jg.ToString)
    "Authorization""Bearer "&access_token)
    Wait For (CBJobSendPayment) JobDone(CBJobSendPayment As HttpJob)
    If CBJobSendPayment.Success Then
    Dim jp As JSONParser:jp.Initialize(CBJobSendPayment.GetString)
    Msgbox(CBJobSendPayment.ErrorMessage, "Error in payment!")
    End If
    I get the following error:
    Is it something that I am doing wrong in the code?
    Last edited: Nov 9, 2018
  2. Erel

    Erel Administrator Staff Member Licensed User

    You are not setting the content type correctly. It must be set with Job.GetRequest.SetContentType.
    Multiverse app likes this.
  3. Multiverse app

    Multiverse app Active Member Licensed User

    Works now, thanks
  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