1.6 KiB
1.6 KiB
OAuth 2.0
What
OAuth provides a level of security to your documentation to restrict access to it. If your API is protected by OAuth, you will need to enable it for Try It Out. Enabling OAuth for Try It Out can be accomplished through two different methods: via Modeling or directly into the Hubs code.
OAuth 2.0 works explicitly for accessCode workflow
How
Modeling
- Create a new Modeling file or select an existing one referenced by the Hub you wish to modify
If you are creating a new Modeling file, make sure to reference it in your Hub
- Next to Security in the left-middle toolbar, Add a Security Scheme by clicking the +
- Input a key
- Select oauth2 under type
- Select accessCode under OAuth flow
- Select an authorization url
- Select a token url
- Add Scope (optional)
- Add a Security scheme description (optional)
Hubs
- Select the Hub you wish to modify
- Select Code View
- Add the following lines of code to your Hub:
"config": {
"http": {
"oauth2": {
"credentials": {
"authorize_url": "insert authorize url here",
"access_token_url": "insert access token url here",
}
}
}
}
Related Articles

