SKY API Error message "failed to resolve environment audience"

I'm attempting to create my first SKY API application and running into tons of roadblocks. I've never worked with OAUTH and the documentation provided by Blackbaud to get this going has me feel like I'm running in circles. I'm trying to build a headless connection to the API that uses cURL. I have used Postman to get an access token and refresh token, but when I use them how I think they are supposed to be used, I get the following response:


{"status":500,"statusCode":500,"title":"Internal Server Error","message":"The SKY API service is currently unavailable - failed to resolve the environment audience.","detail":"The SKY API service is currently unavailable - failed to resolve the environment audience."}


Googling this error message returns Zero responses. Any help to what this error means would be greatly appreciated.


BTW, does Blackbaud provide any example code that represents a simple & complete "Hello World" version of connecting to SKY API and getting any response back from an endpoint like getting a constituent's information? All the endpoint stuff documentation/examples assume that you have mastered the oauth part of the process and the handling of the tokens/keys. And all of the oauth documentation necessary to get you to that point seems to be all theory and flow diagrams. I'd love to see just an actual complete code example of the most simplistic act of passing my client_id, client_secret, api key, and one of my constituent's ID numbers and get their info back. This is something that I can do in 10 lines of code with ON API. I would think if Blackbaud really wants to push people from ON to SKY, they would be providing more concrete resources (ie fully functioning examples) to aid people in doing this.


Thanks again.

Comments

  • Lindsey Rix
    Lindsey Rix Blackbaud Employee
    Tenth Anniversary Kudos 3 Name Dropper Participant
    Hi Doug,


    While I can't help you with OAUTH, I was wondering if you had seen this sample application, Headless Data Sync, in our App showcase?


    It's an example hosted in GitHub that shows how a headless app could work.


    Also, have you looked into Microsoft Power Platform? That enables you to do some cool developer like things without having to do OAUTH.


    Just thought those could be two things to look into until other developers with OAUTH experience can jump in and suggest next steps.


    Thanks,

    Lindsey

  • Chris Rodgers
    Chris Rodgers Blackbaud Employee
    Ninth Anniversary Kudos 2 Name Dropper Participant
    Hi Doug,


    From your message, I assume you've already been through the Authorization Code Flow tutorial. If you haven't, this documentation should walk you step-by-step through OAuth in order to obtain your access token & refresh token. Please feel free to reach out to me if there are specific steps in the tutorial that you believe can be improved. Also good to know if you believe that we have a documentation layout/discoverability issue.


    If your intent is to build a headless application and you've already acquired your refresh token (Postman is certainly a reasonable tool to achieve that), then you should be able to provide the sample Lindsey Rix‍ mentioned with your refresh token, app credentials (client Id & Secret), and API subscription key to get things running. If you'd like to see a code sample that performs the OAuth portion as well as makes a call to SKY API to retrieve constituent data (not headless), you can check out these samples, located right next to our tutorial documentation.


    As for the 500 error response, I can't be entirely sure of the issue without knowing the specific endpoint you called. However, we did have an incident with on of our providers that resulted in downtime the morning you left your post; it's unfortunate, but I believe you might have just caught us at a bad time. If you're still seeing the issue and want to dig in, please reach out to me so we can pinpoint where you're getting the error.


    Also, here is ongoing discussion in the community about this very subject that may help point you in the right direction if you still have questions.