"There was an unexpected error" when attempting OAuth

Options
matthews
matthews Member Posts: 2 Novice Member Novice Member

I am trying to get first step of OAuth working with the API using the following JSON,

"authorize": {        
"url": "https://identity.reckon.com/connect/authorize",                             
  "qs": {            
  "client_id": "{{base64(common.clientId)}}",
  "response_type": "code",
  "redirect_uri": "{{oauth.localRedirectUri}}",
  "scope": "{{join(oauth.scope, ' ')}}",            
  "state": "random_state"
}, 

I have swapped and changed everything about and still get the error. The only information I receive is:

Request Id: c13cd1c6-a2f9-45ba-83c2-fb91d71b32b8

I have checked and the ClientID provide is being correctly encoded to Base64.

Could someone point out what I am doing wrong?

Comments

  • PhuongDo
    PhuongDo Reckon Developer Partner Posts: 326 Reckon Legend Reckon Legend

    HI @matthews,

    Welcome to the forum. This JSON doesn't look right to me, can you share the URL and payload/query string that you test with?

    If you have the valid client Id and valid (registered) callback url, then you should be able to make the URL and test directly in your browser.

    The URL should look like this: https://identity.reckon.com/connect/authorize?client_id=abc123xyz456&response_type=code&scope=openid+read+write+offline_access&redirect_uri=https://your_redirect_url.com/whatever&nonce=random_nonce

    I hope it helps.

    Thanks,

    Phuong


    Phuong Do / Reckon Developer Partner

    phuong@cactussoftware.com.au


  • matthews
    matthews Member Posts: 2 Novice Member Novice Member

    Hi @PhuongDo,

    Thank you for your reply.

    I did some fiddling with they payload this morning, and it turns out the issue was encoding the ClientID in Base64 for this step - sending it as provided by Reckon results in the OAuth working correctly.

    Considering that I could have sworn that I had already tested the ClientID being sent without encoding, your reply definitely saved me time so I appreciate it greatly.

Welcome!

It looks like you're new here. Sign in or register to get started.