# OAuth with PHP, Part One: getting access tokens.

DevFeed: [OAuth with PHP, Part One: getting access tokens.](<https://devfeed.tech/articles/oauth-with-php-part-one-getting-access-tokens-15783.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/oauth-with-php-part-one-getting-access-tokens>)

Author: Tristan Sokol

Published: 2017-11-30T18:22:04Z

Content type: tutorial

Language: en

Sources: [Square Corner Blog RSS Feed](<https://devfeed.tech/sources/square-corner-blog-rss-feed.md>)

Topics: [OAuth](<https://devfeed.tech/topics/oauth.md>), [PHP](<https://devfeed.tech/topics/php.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [code](<https://devfeed.tech/tags/code.md>), [integration](<https://devfeed.tech/tags/integration.md>), [oauth](<https://devfeed.tech/tags/oauth.md>), [php](<https://devfeed.tech/tags/php.md>), [tokens](<https://devfeed.tech/tags/tokens.md>), [web](<https://devfeed.tech/tags/web.md>)

## AI overview

A tutorial showing how to implement Square OAuth with PHP to let an application access Square merchant accounts. It explains the authorization-code flow, including redirecting users, receiving an authorization code, and exchanging it for an access token. The article warns that its information and endpoints are outdated and points readers to current OAuth documentation and migration guidance.

## Source excerpt

Implementing OAuth can be the hardest part of your integration, but it's a must if you're opening your app to other merchants. Here's some help if you're using PHP.