It happened multiples times to me that I needed to automate the verification process of a social media account via SMS.
I tested multiples services which are offering free or paid sms numbers, but non of them worked for instagram, facebook or twitter.
I finally found a website which worked for me. OnlineSim doesn't give a trustful feeling, but it works and thats the most important.
The service offers a webinterface and an API.
Give it a try!