I created an app ID 281676. The domain is verified. The app is not listed, and I don't intend to list it. Required scopes are properly set.
When I visited the install URL, HubSpot told me that the app hasn't been reviewed by Hubspot and asked me whether I want to give it the requested permissions. I said yes.
However, somehow it is not getting installed and doesn't appear in the list of connected apps.
Here is an update. I was able to get the installation to complete by running a php script on my localhost. Below is the code I used. You will need to reference HubSpot docs for where to find your client id, client secret, etc. Of course, no guarantees this wil work for you, but it should. Hope this helps!
<?php
/*
HubSpot: Create and install app from inside developer account into test or live account
1. Go to the install url. Select the account you want to connect it to.
2. It should ask for what content to allow access to.
3. It will then send you to the redirect url with a value attached like this:
https://www.yourdomain.com/?code=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
4. Take the value of "code" and use it in a cURL request to the Oauth server to finalize installation and make it appear in your list of Integrations > Connected Apps
POST https://api.hubapi.com/oauth/v1/token
Parameters:
client_id=YOUR_CLIENT_ID
code=THE_CODE_RETURNED_WITH_THE_RETURN_URL
redirect_uri=https://www.hubspot.com
client_secret=YOUR_CLIENT_SECRET
grant_type=authorization_code
Headers:
Content-Type: application/x-www-form-urlencoded
*/
/*
result from cURL request should be something like this:
string(38) "https://api.hubapi.com/oauth/v1/token/"
Array
(
[token_type] => bearer
[refresh_token] => xxxxxxxx-xxx-xxxx-xxxx-x
[access_token] => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[expires_in] => 21600
)
*/
// set up our parameters array
$params = array(
'grant_type' => 'authorization_code',
'client_id' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'client_secret' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'code' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'redirect_uri' => 'https://www.yourdomain.com'
);
// url to send final activation requiest to
$url = 'https://api.hubapi.com/oauth/v1/token/';
//Initiate cURL
$ch = curl_init($url);
echo var_dump( $url );
$headers = array(
'Content-Type: application/x-www-form-urlencoded;charset=utf-8',
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
//Tell cURL that we want the response to be returned as a string instead of being dumped to the output.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// add our parameters
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
//Set CURLOPT_POST to true to send a POST request.
curl_setopt($ch, CURLOPT_POST, true);
//Execute the POST request and send our XML.
$result = curl_exec($ch);
$info = curl_getinfo($ch);
//Do some basic error checking.
if(curl_errno($ch)){
throw new Exception(curl_error($ch));
}
//Close the cURL handle.
curl_close($ch);
$result = json_decode( $result, true );
//Print out the response output.
echo "<pre>", print_r( $result, 1 ), "</pre>";
?>
Hello, I have a custom app that gives the same warning when I try to install in a client portal - it takes me through to the redirect URL really quickly after showing the warning. But, when I go back to check the app then doesn't show in the connected apps area. I have tried a couple of times, but there's still no app.
Unfortunately it's now a problem for my client (it's an app to connect the Drupal / Hubspot module). Can anyone offer any words of advice or a non-technical solution? (FYI - I'm not a developer.)
I m having the same issue... I install an app from my developer account into a test account. I get the warning and hit okay. I even got the access dialogue to give my app permissions. But when I go the integrations list in the test account, it is not listed... How can I be sure it is even installed? If it is not liseted, I assume it had an issue and is not available to that account?
Here is an update. I was able to get the installation to complete by running a php script on my localhost. Below is the code I used. You will need to reference HubSpot docs for where to find your client id, client secret, etc. Of course, no guarantees this wil work for you, but it should. Hope this helps!
<?php
/*
HubSpot: Create and install app from inside developer account into test or live account
1. Go to the install url. Select the account you want to connect it to.
2. It should ask for what content to allow access to.
3. It will then send you to the redirect url with a value attached like this:
https://www.yourdomain.com/?code=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
4. Take the value of "code" and use it in a cURL request to the Oauth server to finalize installation and make it appear in your list of Integrations > Connected Apps
POST https://api.hubapi.com/oauth/v1/token
Parameters:
client_id=YOUR_CLIENT_ID
code=THE_CODE_RETURNED_WITH_THE_RETURN_URL
redirect_uri=https://www.hubspot.com
client_secret=YOUR_CLIENT_SECRET
grant_type=authorization_code
Headers:
Content-Type: application/x-www-form-urlencoded
*/
/*
result from cURL request should be something like this:
string(38) "https://api.hubapi.com/oauth/v1/token/"
Array
(
[token_type] => bearer
[refresh_token] => xxxxxxxx-xxx-xxxx-xxxx-x
[access_token] => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[expires_in] => 21600
)
*/
// set up our parameters array
$params = array(
'grant_type' => 'authorization_code',
'client_id' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'client_secret' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'code' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'redirect_uri' => 'https://www.yourdomain.com'
);
// url to send final activation requiest to
$url = 'https://api.hubapi.com/oauth/v1/token/';
//Initiate cURL
$ch = curl_init($url);
echo var_dump( $url );
$headers = array(
'Content-Type: application/x-www-form-urlencoded;charset=utf-8',
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
//Tell cURL that we want the response to be returned as a string instead of being dumped to the output.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// add our parameters
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
//Set CURLOPT_POST to true to send a POST request.
curl_setopt($ch, CURLOPT_POST, true);
//Execute the POST request and send our XML.
$result = curl_exec($ch);
$info = curl_getinfo($ch);
//Do some basic error checking.
if(curl_errno($ch)){
throw new Exception(curl_error($ch));
}
//Close the cURL handle.
curl_close($ch);
$result = json_decode( $result, true );
//Print out the response output.
echo "<pre>", print_r( $result, 1 ), "</pre>";
?>
Yes, that's just a warning HubSpot gives if the app isn't listed. Nothing to be worried about unless you're a client and you do not recognize the app when you're linking it.