sky api authentication issue
Hello, I am developing an application with sky api, but I have had problems with authentication, I have followed the flow according to the documentation, take the example code from github https://github.com/blackbaud/sky-api-tutorial -auth-code-c-sharp.git, however I was unable to resolve the issue of authentication
Comments
-
Hi Ysauro Rossette,
Can you provide more details on what issues you're having? What error messages are you seeing?
Also, as a security measure, you should immediately regenerate your Application secret and Subscription keys. Those are sensitive values and should be treated like a password and not shared to the public. You can regenerate your Application secret from your application detail page linked from the My Application page. You can regenerate your subscription keys from the My subscriptions page.
I also recommend deleting the file you uploaded that contains these values.0 -
Hi Ben Wong
The problem is that I can not authenticate, as mentioned in the post, place the data in the configuration file json, I'm working with the sample code from github, I've only gotten to where the image is displayed0 -
Hi Ysauro . I've sent you a PM regarding using our SKYLib.NET library demo app to sanity-check your own authorization code.
Cheers,
Steve Cinquegrana | CEO and Principal Developer | Protégé Solutions
0 -
Ysauro Rossette, what happens when you click the Authorize button? Do you get an error message?0
-
-
Hello Ysauro,
In your word document, you have a browser screenshot that has a URL to your app with an access_token: "localhost:55462/#access_token=...".
I would not have expected this. Because you are using the authorization code flow, the access_token value should not be present in the redirect from `/authorization` to your app. This would only happen if you used the implicit OAuth flow.
Is it possible that you modified this line to set "code" to "token"?
https://github.com/blackbaud/sky-api-tutorial-auth-code-c-sharp/blob/b7f6c2e8edcd7452ac948e6c8b59f6de436756f4/Services/AuthenticationService.cs#L89
When you click the "Log in" button, make sure that your OAuth 2.0 /authorization URL has `response_type=code`
Like this:
https://oauth2.sky.blackbaud.com/authorization?client_id=CLIENTID&response_type=code&redirect_uri=localhost/auth/callback
2 -
Chris Rodgers:
Hello Ysauro,
In your word document, you have a browser screenshot that has a URL to your app with an access_token: "localhost:55462/#access_token=...".
I would not have expected this. Because you are using the authorization code flow, the access_token value should not be present in the redirect from `/authorization` to your app. This would only happen if you used the implicit OAuth flow.
Is it possible that you modified this line to set "code" to "token"?
https://github.com/blackbaud/sky-api-tutorial-auth-code-c-sharp/blob/b7f6c2e8edcd7452ac948e6c8b59f6de436756f4/Services/AuthenticationService.cs#L89
When you click the "Log in" button, make sure that your OAuth 2.0 /authorization URL has `response_type=code`
Like this:
https://oauth2.sky.blackbaud.com/authorization?client_id=CLIENTID&response_type=code&redirect_uri=localhost/auth/callback
Thank you very much, if it worked with the change you suggested
0 -
Hi,
I have a very similar issue, whereby I can't authenticate. I've downloaded sky-api-tutorial-auth-code-php-master and have setup my App, entered in the right Ids, secrets, redirect URI and been through all the documentation.
My app is located here:
https://www.entireti.com/
My Authorisation URI is:
https://oauth2.sky.blackbaud.com/authorization?client_id=6951663b-fce8-4be0-8d82-4f50f00cb4c5&response_type=code&redirect_uri=https://www.entireti.com/
When I press 'Authorize', it just takes me back to the login page, with this URI:
https://www.entireti.com/?code=e244861491604b3a80ad46de7225ea15
The value of scope.isAuthenticated is false.
I can't work out what I'm doing wrong. Any help would be much appreciated.
Thanks,
Chris
UK0 -
Chris Jones:
Hi,
I have a very similar issue, whereby I can't authenticate. I've downloaded sky-api-tutorial-auth-code-php-master and have setup my App, entered in the right Ids, secrets, redirect URI and been through all the documentation.
My app is located here:
https://www.entireti.com/
My Authorisation URI is:
https://oauth2.sky.blackbaud.com/authorization?client_id=6951663b-fce8-4be0-8d82-4f50f00cb4c5&response_type=code&redirect_uri=https://www.entireti.com/
When I press 'Authorize', it just takes me back to the login page, with this URI:
https://www.entireti.com/?code=e244861491604b3a80ad46de7225ea15
The value of scope.isAuthenticated is false.
I can't work out what I'm doing wrong. Any help would be much appreciated.
Thanks,
Chris
UK
Hi Chris,
In the `config.php` file, make sure you're setting the `AUTH_REDIRECT_URI` to `https://www.entireti.com/auth/callback.php`. From clicking Authorize on your site, I can see the `redirect_uri` property is missing the `/auth/callback.php`. Adding that should resolve your issue.
Bobby
1 -
Hi Bobby,
That's great, it worked. Many thanks for your help!
Chris0
Categories
- All Categories
- 6 Blackbaud Community Help
- 206 bbcon®
- 1.4K Blackbaud Altru®
- 394 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 357 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 646 Blackbaud Grantmaking™
- 561 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 934 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.4K Blackbaud Raiser's Edge NXT®
- 3.6K SKY Developer
- 242 ResearchPoint™
- 118 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 238 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 28 PowerUp Challenges
- 3 (Open) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 778 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)


