> For the complete documentation index, see [llms.txt](https://docs.healthsherpa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.healthsherpa.com/on-exchange-api-documentation/api-reference/intake-form-api/authentication-flow-for-intake-api/get-authorize.md).

# GET Authorize

Let a user authorize your OAuth application

## OAuth authorization request (consent screen)

> Starts the authorization code flow and shows the consent screen when interaction is required. If the user is not signed in, they are redirected to sign-in and then returned here with the same query string. Optional parameters include PKCE (\`code\_challenge\`, \`code\_challenge\_method\`) and \`state\` (recommended). Example request: \`<https://healthsherpa.com/oauth/authorize?client\\_id=YOUR\\_OAUTH\\_APPLICATION\\_ID\\&redirect\\_uri=YOUR\\_OAUTH\\_APPLICATION\\_REDIRECT\\_URI\\&response\\_type=code\\&scope=intake\\_form\\_api\\`><br>

```json
{"openapi":"3.0.3","info":{"title":"HealthSherpa OAuth Authorization","version":"1.0.0"},"tags":[{"name":"GET authorize","description":"Let a user authorize your OAuth application"}],"servers":[{"url":"https://healthsherpa.com/oauth","description":"Production environment"},{"url":"https://staging.healthsherpa.com/oauth","description":"Staging environment"}],"paths":{"/authorize":{"get":{"summary":"OAuth authorization request (consent screen)","description":"Starts the authorization code flow and shows the consent screen when interaction is required. If the user is not signed in, they are redirected to sign-in and then returned here with the same query string. Optional parameters include PKCE (`code_challenge`, `code_challenge_method`) and `state` (recommended). Example request: `https://healthsherpa.com/oauth/authorize?client_id=YOUR_OAUTH_APPLICATION_ID&redirect_uri=YOUR_OAUTH_APPLICATION_REDIRECT_URI&response_type=code&scope=intake_form_api`\n","operationId":"oauthAuthorizeGet","tags":["GET authorize"],"parameters":[{"$ref":"#/components/parameters/OAuthClientIdQuery"},{"$ref":"#/components/parameters/OAuthRedirectUriQuery"},{"$ref":"#/components/parameters/OAuthResponseTypeQuery"},{"$ref":"#/components/parameters/OAuthScopeQuery"},{"$ref":"#/components/parameters/OAuthStateQuery"}],"responses":{"200":{"description":"HTML consent page. Only displays when the user does not have any unrevoked access tokens. Otherwise, we'll redirect to client `redirect_uri`.\n","content":{"text/html":{"schema":{"$ref":"#/components/schemas/HtmlBody"}}}},"302":{"description":"Redirect to client `redirect_uri` or to login when unauthenticated."},"429":{"description":"Too many requests to OAuth authorization endpoints. Limit is 500 requests per minute (combined across authorization-related traffic when rate limiting applies).","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Missing a parameter or parameter does not match client values, such as redirect_uri saved in HealthSherpa","content":{"text/html":{"schema":{"type":"string"}}}}}}}},"components":{"parameters":{"OAuthClientIdQuery":{"name":"client_id","in":"query","required":true,"schema":{"type":"string"},"description":"Registered OAuth client id (public client identifier issued by HealthSherpa)."},"OAuthRedirectUriQuery":{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string"},"description":"Must exactly match a registered redirect URI for the client."},"OAuthResponseTypeQuery":{"name":"response_type","in":"query","required":true,"schema":{"type":"string","enum":["code"]},"description":"Authorization code flow uses `code`."},"OAuthScopeQuery":{"name":"scope","in":"query","required":true,"schema":{"type":"string"},"description":"Space-delimited scopes requested for the grant."},"OAuthStateQuery":{"name":"state","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque value echoed back to the client to prevent CSRF."}},"schemas":{"HtmlBody":{"type":"string","description":"HTML document body."}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.healthsherpa.com/on-exchange-api-documentation/api-reference/intake-form-api/authentication-flow-for-intake-api/get-authorize.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
