Authorizing server-to-server API calls?
What's the best way to set up an OAuth 2.0 authorized request to the API from an automated script?
I'm trying to set up an API solution that will submit a specific expense type automatically, pulling from another resource used by our organization; however, the instructions I can find in the documentation all seem to pertain to user-facing apps.
What would be best for a case where the user won't interact with the application? What should the authentication workflow look like for cases where there won't be someone to perform the authorize/redirect step?
Comments
-
@Louise Seale
You'll want to use the confidential applications flow. This will require user interaction to return your first token, but once you have that token you can save it and use the refresh token to automatically refresh your token programmatically whenever you want.2 -
@Ben Regier
I'm a bit new to working with OAuth2.0, so please clarify for me: will the refresh token expire at any point/will the manual token generation step need to be repeated at any point?0 -
@Louise Seale
Authentication token is good for 60 minutesRefresh token is good for 365 days. You can use refresh token to get new authentication token as long as the refresh token isn't expired. When getting a new authentication token, you have option to “refresh” the refresh token too, which keeps the refresh token “rolling” so it won't expire and needing to do the “manual login".
2 -
@Louise Seale
As Alex said, the refresh token does expire, but it has a much longer life than the access tokenEvery time you refresh your access token, you can also get a new refresh token. So my process just saves both of them for next time and I never have to worry about the refresh token expiring.
If everything goes well, you should only need to do the manual process once, to get your first set of tokens. But you may as well keep that script around in case you need to do it again sometime in the future!
3 -
@Alex Wong @Ben Regier
This helps immensely. Thank y'all both very much!0
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)

