# Auth via api php

**URL:** <https://community.hubspot.com/t/auth-via-api-php/29137>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [December 14, 2020, 2:54pm UTC](https://community.hubspot.com/t/auth-via-api-php/29137 "2020-12-14T14:54:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AHryshkevich](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ahryshkevich/32/31639_2.png) [@AHryshkevich](https://community.hubspot.com/u/AHryshkevich)\
**Post date:** [December 14, 2020, 2:54pm UTC](https://community.hubspot.com/t/auth-via-api-php/29137/1 "2020-12-14T14:54:55Z")

</div>

I.m integrating my web app with hubspot via API. When i make request to

`https://app.hubspot.com/oauth/authorize `

1. Open page [HubSpot Login and Sign in](https://app.hubspot.com/login/loginRedirectUrl=https%3A%2F%2Fgiftsenda.test%2Fhubspot%2Fauth)  
After login  
2.Open page [Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts-beta)  
The problem is there was no redirect

I need this redirect to get authorization code

How to fix it? Thx for help

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [December 14, 2020, 3:30pm UTC](https://community.hubspot.com/t/auth-via-api-php/29137/2 "2020-12-14T15:30:14Z")

</div>

Hey @AHryshkevich

Welcome to the Community!

@prosa is my new go to for all things OAuth 😀

In case you haven’t seen the OAuth documentation [here](https://developers.hubspot.com/docs/api/working-with-oauth) is a link

There is also a good[Academy class](https://academy.hubspot.com/lessons/using-oauth-with-hubspot?library=true) on it

---

<div class="post-metadata">

**Author:** ![AHryshkevich](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ahryshkevich/32/31639_2.png) [@AHryshkevich](https://community.hubspot.com/u/AHryshkevich)\
**Post date:** [December 14, 2020, 4:28pm UTC](https://community.hubspot.com/t/auth-via-api-php/29137/3 "2020-12-14T16:28:04Z")

</div>

But why was no redirect to my redirect\_uri?

---

<div class="post-metadata">

**Author:** ![AHryshkevich](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ahryshkevich/32/31639_2.png) [@AHryshkevich](https://community.hubspot.com/u/AHryshkevich)\
**Post date:** [December 15, 2020, 11:38am UTC](https://community.hubspot.com/t/auth-via-api-php/29137/4 "2020-12-15T11:38:21Z")

</div>

I forcefully open the link

`https://app.hubspot.com/oauth/authorize`

with parameters (client\_id, scope, redirect\_uri) in the browser and it responds “Couldn’t complete the connection This hub doesn’t have access to some HubSpot features that are required by this integration. Please contact the integrator.”  
How to fix ?
