Recently Instagram introduced their new Creator profiles. Your Instagram account can now be one of the following: personal account, business account or creator account.
Not everything which is possible with a business account is also possible with a creator account. So I need a way in my application to determine if it's one or the other.
How can I do this?
Thanks @RaideR for the question and the support in the comment.
Just to help everyone out there who doesn't want to scrape just to get such a basic info, it's actually possible to extract this by simulating an empty POST call to the /userid/media endpoint and catching the exception with code = 10, which indicates the account is a Creator. All other cases are Business Acccounts.
POST /userid/media
CATCH FacebookResponseException
Below you can find my PHP code as reference, but you can apply the same logic in any language with any framework:
public function isBusiness() {
try {
$this->conn->post("/".$this->fb_id."/media", [], $this->getToken());
return true;
} catch (FacebookResponseException $e) {
if ($e->getCode() == 10) {
return false;
} catch (\Exception $e) {
return true;
}
}
I wrote a more extensive article here if you want more info.