Refresh Token for .NET Headless Data Sync cs project

Hi all,


I'm trying to get to grips with the Headless Data Sync project (https://github.com/blackbaud/skyapi-headless-data-sync) that was published on GH by blackbaud the other day.


I'm hitting a wall when it comes to the refresh tokens. The readme says: 
  • For the first time, run the console app providing the refresh token as an argument.

dotnet run --refreshtoken <refreshtoken><br/><br/>Fundamental question: where do I get the refresh token from? I've got the app authorised, so have the ID and Secret, but no idea about the refresh token.

I'm reasonably familiar with c# and .NET, but completely new to APIs. I would really appreciate an idiot-proof answer.

Cheers all,

Bill

Comments

  • Hi Bill,


    You'll need to get the Refresh Token using a separate utility app, for example, where you would provide your SKY credentials, etc.


    You're welcome to use one of the demonstration .NET applications provided with our SKYLib.NET SKY API library and SDK. In rate-limited mode, SKYLib.NET is free to use. You can enter your details, make any API call and get hold of your Refresh Token:

    110fa97ddcef1cec0eb5ec986e424225-huge-sk


    Once you have this, the headless app will be able to obtain a fresh set of tokens and away you go. Of course, unfortunately there is always a possibility that at some point the unattended app's token set will get corrupted or become out-of-sync due to network issues, etc and the manual initialization will need to be redone. One of the downsides to oAuth I'm afraid.


    I hope that helps.

    Steve Cinquegrana | CEO and Principal Developer | Protégé Solutions

     
  • Hi Steve,

     

    Thanks so much for your answer – really
    helpful.

     

    I had actually been planning to explore
    SKYLib.NET, but hadn’t got round to it. Perhaps I will look at that
    first. Would it be okay to fire some questions in your direction if
    need be?

     

    Best wishes,

     

    Bill

     

    Bill Saunders

    Development & Engagement | Datblygu ac
    Ymgysylltu

    Marketing, Recruitment & International |
    Marchnata, Recriwtio a Rhyngwladol

    Swansea University | Prifysgol
    Abertawe

    Singleton Park | Parc Singleton

    Swansea | Abertawe

    Wales | Cymru

    SA2 8PP

     

    Phone | Ffôn 01792 606445
    Email | Ebost w.saunders@swansea.ac.uk

     

     

    The University
    welcomes correspondence in Welsh and English | Mae’r Brifysgol yn
    croesawu gohebiaeth yn Gymraeg ac yn Saesneg.

     

    Please don't print
    this e‐mail unless you really need to. | Peidiwch ag argraffu’r
    e‐bost hwn oni bai fod gwir angen gwneud hynny.

     

    The contents of this
    email are confidential and for the intended recipient only. If you
    have received this message in error, please inform the sender and
    delete the message. | Mae cynnwys yr ebost hwn yn gyfrinachol a dim
    ond y derbynnydd a fwriadwyd a ddylai ei ddarllen. Os derbynioch y
    neges mewn camgymeriad, rhowch wybod i’r anfonydd a dilëwch y
    neges.

     

    Swansea University is a
    registered charity. No. 1138342 | Mae Prifysgol Abertawe yn elusen
    gofrestredig. Rhif. 1138342

     

  • Hi Bill,


    Sure, ask away. I'd recommend having a play with the demonstration applications in the first instance. These are provided as full-source code VB and C#.NET projects and are there for you to experiment with, change, adapt to your own use, etc.


    Just an aside, SKYLib.NET has built-in code to flexibly manage outages (eg Blackbaud server outages, network failures, etc) and even call quota exhaustion, which is particularly important for unattended/headless applications to avoid manual reauthorization.


    Cheers, Steve