{"items":[{"type":"link","label":"OAuth 2.0 Authorization Server API","link":"/code-samples/auth-refresh","routeSlug":"/code-samples/auth-refresh","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-refresh.json","url":"/_bundle/code-samples/auth-refresh.json?download"},{"kind":"download","label":"auth-refresh.yaml","url":"/_bundle/code-samples/auth-refresh.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-refresh"}],"sectionId":"/code-samples/auth-refresh"}]}]}},{"label":"Exchange Authorization Code for Refresh Token","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/code-samples/auth-refresh/other/exchangetoken","routeSlug":"/code-samples/auth-refresh/other/exchangetoken","metadata":{"seo":{"title":"Exchange Authorization Code for Refresh Token","description":"Refresh an existing access token."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"exchangeToken","name":"Exchange Authorization Code for Refresh 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 Refresh Token","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Refresh an existing access token."},{"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/TokenRequestRefresh"}},"schemaId":"components/schemas/TokenRequestRefresh","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":[],"cookie":[]},"security":[],"requestBody":{"application/x-www-form-urlencoded":{"schemaId":"components/schemas/TokenRequestRefresh"}},"responseCodes":["200"],"pointer":"/protocol/openid-connect/token","href":"other/exchangetoken","openApiOperationId":"exchangeToken","summary":"Exchange Authorization Code for Refresh Token"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://iam.wallapop.com/realms/wallapop-connect","description":"Default issuer URI"}],"schemaId":"components/schemas/TokenRequestRefresh","mediaTypes":["application/x-www-form-urlencoded"],"mediaTypeSchemas":{"application/x-www-form-urlencoded":{"schemaId":"components/schemas/TokenRequestRefresh"}},"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/TokenRequestRefresh":{"id":"components/schemas/TokenRequestRefresh","kind":"json-schema","title":"TokenRequestRefresh","data":{"type":"object","required":["grant_type","refresh_token","client_id","client_secret"],"properties":{"grant_type":{"type":"string","description":"The type of authorization flow","enum":["refresh_token"]},"refresh_token":{"type":"string","description":"The refresh token obtained during the initial token exchange."},"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."}}}}},"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-refresh","position":"off","description":"Mock server"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/code-samples/auth-refresh.json?download"},{"url":"/_bundle/code-samples/auth-refresh.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-refresh","routesMapping":{}}