BlinkMonitorProtocol icon indicating copy to clipboard operation
BlinkMonitorProtocol copied to clipboard

What is the endpoint I can use if I wanted to programatically create an account?

Open Randy1Burrell opened this issue 10 months ago • 6 comments

Hi @MattTW, thank you for this lib. One feature is missing that I need to use. If you can point me in the right direction then I can add it in myself. Do you know the REST endpoint Blink uses when creating accounts?

Thank you in advance!!

Randy1Burrell avatar Sep 15 '23 22:09 Randy1Burrell

@Randy1Burrell

POST {{baseurl}}api/v6/account/register

Minimal Body

{
    "email": "{email}",
    "password": "{{password}}",
    "password_confirm": "{{password}}",
    "reauth": false,
    "country": "u014" // OPTIONAL: defaults to eu
}

Note: The register post body extends the login body, so I'd recommend including unique_Id, device_identifier, and client_name at a minimum.

The response is nearly identical to the login endpoint. You will need to verify the pin emailed to you. Likely using the same API endpoint as described during the login process.

amattu2 avatar Dec 13 '23 19:12 amattu2

Thanks 🙏🏿 man. What is the baseurl?

Randy1Burrell avatar Dec 13 '23 20:12 Randy1Burrell

Thanks 🙏🏿 man. What is the baseurl?

Base URL aka "initial server URL" is https://rest-prod.immedia-semi.com/

amattu2 avatar Dec 13 '23 21:12 amattu2

In your experience, do they throttle your requests? I'm building something that will need to pull loads of videos from their APIs.

Randy1Burrell avatar Dec 13 '23 22:12 Randy1Burrell

Also, do you know what the country codes are? Or can you point me in the direction where I can find these details out myself?

Randy1Burrell avatar Dec 13 '23 22:12 Randy1Burrell

@Randy1Burrell In your experience, do they throttle your requests? I'm building something that will need to pull loads of videos from their APIs.

I'm not actually sure. I just started looking into their API today. I'd recommend simulating what a typical user can do and staggering your requests.

Also, do you know what the country codes are? Or can you point me in the direction where I can find these details out myself?

I just realized the u014 country in my example isn't actually an option, so ignore that. The country code API is here:

GET https://rest-prod.immedia-semi.com/api/v1/countries

It returns a very long list otherwise I'd include it. I guess you'd pick one of those during registration.

amattu2 avatar Dec 13 '23 22:12 amattu2