I’ve been reading a few step-by-step articles about how to install a custom HubSpot app.
So far I’ve been able to generate an URL Install (OAuth) and after copy-pasting it in my browser it prompts to select an account to install. After selecting a standard HubSpot account (neither a test one or a developer one), it redirects me to the portal along with a custom code, so I assume everything worked correctly.
Right after it, checking Settings>Connected App in the selected account shows that the App wasn’t installed successfully.
Am I missing some step right after being redirected to the portal?
Thanks in advance!
@Teun , @prosa
Either of you able to help here?
Probably you’re missing the last step, after you get an authorization code, you need to handle the authorization callback to exchange that code for an access token, I guess until you don’t get an access token it won’t appear as an installed application. You can read more about this at step # 4 (Exchange authorization code for tokens) docs: Working with OAuth | OAuth Quickstart Guide - HubSpot docs
You can read another useful guide about building HubSpot apps and test it quickly here (using a third party integration platform)
Thanks! Apprently it was the missing step.
I just had a some issues when sending the post request for it, as it returned a 415 (Unsupported Media Type) error.
Just for future reference and to whoever goes through the same issues as me, to fix it the content-type had to be set to:
application/x-www-form-urlencoded;charset=utf-8
If you are using json body, might as well try to set it to:
application/json;charset=utf-8
Also had to change the header to lower case:
content-type
That should be it.