Request Authorization Code
Description
Invoke a request for an authorization code from a partner's platform.
Process Flow
- User selects to link their Apple Business account to their partner's account from within the partner's platform
- Partner platform generates an authorization request and passes into the request all required parameters
Authorization Request Parameters
| Name | Input |
|---|---|
client_id | |
code_challenge | |
response_type | |
redirection_endpoint | |
state |
Response Type
MUST be code.
State
MUST be be a randomized value, not a URL-encoded value.
Authorization Request Structure
/oauth2/v1/authorize?client_id={clientId}&
code_challenge={codeChallenge}&response_type={responseType}&
redirect_uri={redirectionEndpoint}&state={state}
Example Authorization Request
/oauth2/v1/authorize?client_id=29352915982374239857&
code_challenge=asdhasfasdfh&response_type=code&
redirect_uri=https://www.third-party.com/authorization&state=xyzABC123
- Using the authorization request, the partner's platform directs the user to Apple Business, along with parameters
- Apple Business verifies that:
- Authorization request has a corresponding, registered app in Apple Business
client_idandredirect_urimatch the registered app
- Once verified, Apple Business stores the
code_challengeandstatevalues - Launch Apple Business UI
- If user is already logged into Apple Business, a list of approved companies they are a member of are displayed. Else, the user is prompted to login
- User selects one company
- Apple Business displays consent form
- Apple Business prompts user to allow or deny a partner's request to link the respective accounts
- If request is allowed, the Apple Business user is redirected to a partner-defined redirection endpoint:
- Partner's platform captures the authorization
codeand the originalstatevalue - Partner's platform navigates the user to a partner-defined UI
note
code has a lifetime of five (5) minutes
Refer to Request Token for details about next steps.
Authorization Response Parameters
| Name | Input |
|---|---|
code |
Example Authorization Response
{url}?code=g0ZGZmNjVmOWI&state=xyzABC123