Hi Team
Can someone guide me on this?
I am trying to invoke the https://oauth2.sky.blackbaud.com/token API to request for a token. I have set the required body params which is grant_type (hardcoded to “authorizationcode”), code (exact code received from the Query param), redirect_uri (the uri specified in my application).
For the header param, i have set the Content-Type as "application/x-www-form-urlencoded". For the authorization param, i am sending the word “Basic ” (with a space after it) and an 64 encoded value which i derived from applicationid : application_secret.
All my input request looks fine to me. But i get a 400 Bad Request as response. (Pasting the error below, apologies for the junk String pasted). Has anyone faced such error? Please advise.
HttpResponseProxy{HTTP/1.1 400 Bad Request [Cache-Control: no-cache, Pragma: no-cache, Content-Type: application/json;charset=UTF-8, Expires: -1, Strict-Transport-Security: max-age=31536000;includeSubDomains, Content-Security-Policy: default-src 'self';script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js;style-src 'self' 'unsafe-inline' fonts.googleapis.com https://signin.blackbaud.com;img-src 'self' data: https://*.blob.core.windows.net/bbdevappassets/;font-src 'self' fonts.gstatic.com https://sky.blackbaudcdn.net;connect-src 'self' https://signin.blackbaud.com/api/accountmanagement/user/jwt https://*.mixpanel.com, X-Frame-Options: DENY, Date: Thu, 11 Nov 2021 21:43:58 GMT, Content-Length: 101, Set-Cookie: visid_incap_855125=TrB5ajn5T1Co7BDlHqPEZ56OjWEAAAAAQUIPAAAAAADP6cYiEGlB2pE65YzZ+CuZ; expires=Fri, 11 Nov 2022 09:46:21 GMT; HttpOnly; path=/; Domain=.sky.blackbaud.com, Set-Cookie: incap_ses_7224_855125=xu1JQ+YVPze4ejIJ+81AZJ6OjWEAAAAAoN/snm1HJ1iYIodaefgRng==; path=/; Domain=.sky.blackbaud.com, X-CDN: Imperva, X-Iinfo: 10-139097324-139097628 NNNN CT(5 14 0) RT(1636667036966 1795) q(0 0 0 0) r(0 0) U5] ResponseEntityProxy{[Content-Type: application/json;charset=UTF-8,Content-Length: 101,Chunked: false]}}