Error 400 when connecting to new environment

Hi there,

I am currently trying to set up sky api to a new environment. I have already enabled sky api on the new environment as well as add the application to the new environments.

After retrieving the new access and refresh tokens for the new environment I am met with the following error when attempting to connect pull data using get request:

{"title":"Bad request","status":400,"detail":"This SKY API service is not available in this Blackbaud Environment.","message":"This SKY API service is not available in this Blackbaud Environment.","statusCode":400}
Code":400}

Any ideas on why I am receiving this issue with the new environment? The same code I am using works with get requests in the old environment but not with this environment

Comments

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

    @Peter Kungania, this error indicates that the API is not available in a given Blackbaud environment. Assuming these requests are coming from your own developer account/subscription and without providing customer details--looking at our analytics, it appears that you're making requests to the Fundraising API (an Raiser's Edge NXT API) in a Blackbaud Environment that does not have the Raiser's Edge NXT product. I do see requests from your account to another environment that does contain this product, which explains why they are successful.

  • @Chris Rodgers, Thanks for the quick response.

    Could you elaborate more on the part that I'm making requests to the fundrasing api? Looking at the get requests I made they were to the General ledger apis and I can see there are a number of failed calls on there.

    In what other way can I check if the API is available in a given blackbaud environment?

    When testing the general ledger api through the api reference sites I was able to make get requests but not through the python scirpts I wrote.

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

    @Peter Kungania Over the last 3 days, I see requests from your account to the Fundraising and General Ledger APIs; most of these (18) are to the Fundraising's Campaign list endpoint. Of those 18 requests, 16 fail with the error response in your original post due to the Blackbaud environment not having a Raiser's Edge NXT instance. I do see a few failed requests to the General Ledger API (400 HTTP status code), but from what I can see, these are not due to the same Environment compatibility error (for example, I see the following error for a call to Account code (list) endpoint:
    {"Error":"Invalid Request","Details":["The field Limit must be between 1 and 500."],"ErrorPath":null}).

    Unfortunately, we do not currently have a way for your application to proactively check for this environment capability.

  • @Chris Rodgers
    So does this mean that I'm not able to connect to the new environment using the same application? Would I need to create a new application for this to work?

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

    @Peter Kungania I think it depends on what your application does and what the user experience is. If access to a particular API or APIs for a particular product are required for the application to function, many applications would respond to this error by letting the user know that the selected environment is not compatible with the application. However, other applications without this requirement could gracefully degrade the user experience to limit functionality to only the APIs it can access in that environment. Creating a separate application may make sense if that provides the better user experience.

  • Hi @Chris Rodgers,

    Thanks for your help! Was able to resolve the issue. The error was due to the environment making a call using the wrong endpoint. Seems that this was a test endpoint that I had not corrected earlier

Categories