Getting an Authorization Key - Smart Home & API / API - Rachio Community

Getting an Authorization Key

post by championc on Jun 5, 2022

Hi all

Following this page - Rachio API Documentation - I have obtained my API key from my account settings page, but the very first step "Passing your access token in an authorization header" to get my Access Token, is a CURL with the API Key and an Authorization Key

But where do I get the Authorization Key ?

post by Thomas_Lerman on Jun 5, 2022

Only on the web app the following talks about it Welcome · Rachio

post by championc on Jun 5, 2022

Yes, this is the SAME page that I went to.

To get your Access Token, it says to follow this example

curl -X GET -H "Authorization:Bearer **8e600a4c-0027-4a9a-9bda-dc8d5c90350d**" https://api.rach.io/1/public/person/24763e8a-4418-11e4-a183-164230d1df6

I have my API key, but where does the bit in BOLD above come from please ?

post by Thomas_Lerman on Jun 5, 2022

The section that has that example is "Passing your access token in an authorization header".

The section right after that example is “Making your first request”, which describes “Once you have acquired your token, you can grab your Person Id and begin making requests” and gives the example

curl -v https://api.rach.io/1/public/person/info -H "Authorization: Bearer xxxx-xxx"

post by championc on Jun 5, 2022

Yes, I see that too - but HOW do I acquire my token ?

post by Thomas_Lerman on Jun 5, 2022

Your key is passed in the authorization header. It looks like they are using key and token synonymously.

post by championc on Jun 5, 2022

Sorry, but I really am not understanding anything.

So this is my api - d4d8cfc2-0744-xxxx-bb0c-c7a2fcdaxxxx What do I do with it ?

post by Thomas_Lerman on Jun 5, 2022

That probably is not something to share, but replace the API-key-goes-here with your API key:

curl -v https://api.rach.io/1/public/person/info -H "Authorization: Bearer API-key-goes-here"

post by championc on Jun 6, 2022

In the documentation for this it says

curl -v https://api.rach.io/1/public/person/info -H "Authorization: Bearer xxxx-xxx"

Can you please give me EXACTLY what I need to type into my terminal if I was using an API of d4d8cfc2-0744-xxxx-bb0c-c7a2fcdaxxxx, because nothing that you are saying is making any sense to me

post by Brg468 on Jun 6, 2022

curl -v https://api.rach.io/1/public/person/info -H "Authorization: Bearer d4d8cfc2-0744-xxxx-bb0c-c7a2fcdaxxxx"

post by Thomas_Lerman on Jun 6, 2022

Ooops, sorry, I realized I put in more information, but the forums hid part of the text which made my last post read nonsensically. @Brg468 answered it correctly.

post by championc on Jun 7, 2022

Thanks

The example only having xxxx-xxx confused the hell out of me.

post by Thomas_Lerman on Jun 7, 2022

My message sure did not help, sorry about that.

post by championc on Jun 7, 2022

This stupid thing really doesn’t like me at all. All I get is a > prompt

post by Thomas_Lerman on Jun 7, 2022

Weird, that is almost like you do not have the quotes at the end . . . oh wait, are you using the standard double quotes (" ) before Authorization and at the end? My eyes are tired and I cannot tell if they are playing tricks on me.