{"items":[{"type":"link","label":"OAuth 2.0 Authorization Server API","link":"/code-samples/auth","routeSlug":"/code-samples/auth","content":{"contentType":"overview","meta":{"name":"OAuth 2.0 Authorization Server API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"auth.json","url":"/_bundle/code-samples/auth.json?download"},{"kind":"download","label":"auth.yaml","url":"/_bundle/code-samples/auth.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"cURL","lang":"curl"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://iam.wallapop.com/realms/wallapop-connect","description":"Default issuer URI"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"OAuth 2.0 Authorization Server API (1.0.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":"API for handling OAuth 2.0 Authorization Code PKCE flow."}],"sectionId":"/code-samples/auth"}],"sectionId":"/code-samples/auth"}]}]}},{"label":"Request Authorization Code","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/code-samples/auth/other/getauthorizationtoken","routeSlug":"/code-samples/auth/other/getauthorizationtoken","metadata":{"seo":{"title":"Request Authorization Code","description":"Redirects the user to the login screen for authentication and authorization."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getAuthorizationToken","name":"Request Authorization Code","isWebhook":false,"pointer":"/paths/~1protocol~1openid-connect~1auth/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Request Authorization Code","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Redirects the user to the login screen for authentication and authorization."},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"client_id","in":"query","schemaId":"schema_18","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The client application’s identifier."},"children":[]}]}]}],"required":true},{"name":"response_type","in":"query","schemaId":"schema_19","description":"Must be \"code\" for Authorization Code Grant.","required":true},{"name":"redirect_uri","in":"query","schemaId":"schema_20","description":"The URL where the authorization server will send the user after authentication.","required":true},{"name":"code_challenge","in":"query","schemaId":"schema_18","description":"The PKCE code challenge derived from the code verifier.","required":true},{"name":"code_challenge_method","in":"query","schemaId":"schema_21","description":"The transformation method for the code challenge. Must be \"S256\".","required":true},{"name":"state","in":"query","schemaId":"schema_18","description":"Optional opaque value to prevent cross-site request forgery."}],"pointer":"/paths/~1protocol~1openid-connect~1auth/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/protocol/openid-connect/auth","servers":[{"url":"https://iam.wallapop.com/realms/wallapop-connect","description":"Default issuer URI"}],"parameters":{"path":[],"query":[{"name":"client_id","in":"query","required":true,"schemaId":"schema_18"},{"name":"response_type","in":"query","required":true,"schemaId":"schema_19"},{"name":"redirect_uri","in":"query","required":true,"schemaId":"schema_20"},{"name":"code_challenge","in":"query","required":true,"schemaId":"schema_18"},{"name":"code_challenge_method","in":"query","required":true,"schemaId":"schema_21"},{"name":"state","in":"query","schemaId":"schema_18"}],"querystring":[],"header":[],"cookie":[]},"security":[],"responseCodes":["302"],"pointer":"/protocol/openid-connect/auth","href":"other/getauthorizationtoken","openApiOperationId":"getAuthorizationToken","summary":"Request Authorization Code"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://iam.wallapop.com/realms/wallapop-connect","description":"Default issuer URI"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"302","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Redirects to login screen. Upon successful authentication, redirects back to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redirect_uri"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with an authorization code."},"children":[]}]}]}]}],"pointer":"/paths/~1protocol~1openid-connect~1auth/get/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/getauthorizationtoken"}],"panels":[]}]},"httpPath":"/protocol/openid-connect/auth"},{"label":"Exchange Authorization Code for Access Token","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/code-samples/auth/other/exchangetoken","routeSlug":"/code-samples/auth/other/exchangetoken","metadata":{"seo":{"title":"Exchange Authorization Code for Access Token","description":"Obtain an access token using an authorization code."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"exchangeToken","name":"Exchange Authorization Code for Access Token","isWebhook":false,"pointer":"/paths/~1protocol~1openid-connect~1token/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Exchange Authorization Code for Access Token","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Obtain an access token using an authorization code."},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"User-Agent","in":"header","schemaId":"schema_18","description":"The user agent string of the client application.","required":true}],"pointer":"/paths/~1protocol~1openid-connect~1token/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/x-www-form-urlencoded"],"mediaTypeSchemas":{"application/x-www-form-urlencoded":{"schemaId":"components/schemas/TokenRequestAuthCode"}},"schemaId":"components/schemas/TokenRequestAuthCode","pointer":"/paths/~1protocol~1openid-connect~1token/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/protocol/openid-connect/token","servers":[{"url":"https://iam.wallapop.com/realms/wallapop-connect","description":"Default issuer URI"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"User-Agent","in":"header","required":true,"schemaId":"schema_18"}],"cookie":[]},"security":[],"requestBody":{"application/x-www-form-urlencoded":{"schemaId":"components/schemas/TokenRequestAuthCode"}},"responseCodes":["200"],"pointer":"/protocol/openid-connect/token","href":"other/exchangetoken","openApiOperationId":"exchangeToken","summary":"Exchange Authorization Code for Access Token"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://iam.wallapop.com/realms/wallapop-connect","description":"Default issuer URI"}],"schemaId":"components/schemas/TokenRequestAuthCode","mediaTypes":["application/x-www-form-urlencoded"],"mediaTypeSchemas":{"application/x-www-form-urlencoded":{"schemaId":"components/schemas/TokenRequestAuthCode"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successful token response.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TokenResponse"}},"schemaId":"components/schemas/TokenResponse"}],"pointer":"/paths/~1protocol~1openid-connect~1token/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/TokenResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TokenResponse"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/exchangetoken"}],"panels":[]}]},"httpPath":"/protocol/openid-connect/token"}],"store":{"schemaStore":{"components/schemas/TokenRequestAuthCode":{"id":"components/schemas/TokenRequestAuthCode","kind":"json-schema","title":"TokenRequestAuthCode","data":{"type":"object","required":["grant_type","code","redirect_uri","code_verifier","client_id","client_secret"],"properties":{"grant_type":{"type":"string","description":"The type of authorization flow.","enum":["authorization_code"]},"code":{"type":"string","description":"The authorization code received from the authorization server."},"redirect_uri":{"type":"string","format":"uri","description":"Must match the redirect URI used in the authorization request."},"code_verifier":{"type":"string","description":"The original PKCE code verifier."},"client_id":{"type":"string","description":"A public identifier for an application registered with the authorization server."},"client_secret":{"type":"string","description":"A confidential key used to authenticate the application."}}}},"components/schemas/TokenResponse":{"id":"components/schemas/TokenResponse","kind":"json-schema","title":"TokenResponse","data":{"type":"object","properties":{"access_token":{"type":"string","description":"The access token issued by the authorization server, used to authenticate API requests."},"expires_in":{"type":"integer","description":"The duration in seconds until the access token expires."},"refresh_token":{"type":"string","description":"A credential used in OAuth 2.0 that allows a client application to obtain a new access token without requiring the user to log in again."},"scope":{"type":"string","enum":["offline_access"],"description":"The scope of access granted by the token. In this case, it allows offline access (refresh token capability)."},"token_type":{"type":"string","enum":["Bearer"],"description":"The type of token issued. Always \"Bearer\" for OAuth 2.0 access tokens."}}}},"schema_18":{"kind":"json-schema","data":{"type":"string"},"id":"schema_18"},"schema_19":{"kind":"json-schema","data":{"type":"string","enum":["code"]},"id":"schema_19"},"schema_20":{"kind":"json-schema","data":{"type":"string","format":"uri"},"id":"schema_20"},"schema_21":{"kind":"json-schema","data":{"type":"string","enum":["S256"]},"id":"schema_21"}},"exampleStore":{},"securitySchemeStore":{},"servers":[{"url":"https://iam.wallapop.com/realms/wallapop-connect","description":"Default issuer URI"}],"specType":"openapi"},"options":{"showExtensions":true,"jsonSamplesExpandLevel":5,"codeSamples":{"skipOptionalParameters":true,"languages":[{"lang":"curl","label":"cURL"}]},"feedback":{"type":"mood","settings":{"comment":{"satisfiedLabel":"What did you like most about this page?","dissatisfiedLabel":"What didn't you like about this page?","neutralLabel":"What could we improve on this page?"},"label":"Was this section helpful?"}},"mockServer":{"url":"/_mock/code-samples/auth","position":"off","description":"Mock server"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/code-samples/auth.json?download"},{"url":"/_bundle/code-samples/auth.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"OAuth 2.0 Authorization Server API","description":"API for handling OAuth 2.0 Authorization Code PKCE flow."}},"baseSlug":"/code-samples/auth","routesMapping":{}}