Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token generation #87

Closed
krdawid opened this issue Jun 30, 2022 · 3 comments
Closed

Token generation #87

krdawid opened this issue Jun 30, 2022 · 3 comments

Comments

@krdawid
Copy link

krdawid commented Jun 30, 2022

Dear All,

I am not able to generate oauth token with site24x7 to be able to connect via Terraform, can you please provide any advise ?

Thank you in advance

@jim-billy-zoho
Copy link
Collaborator

Hi @krdawid,
For fetching SITE24X7_CLIENT_ID, SITE24X7_CLIENT_SECRET and SITE24X7_REFRESH_TOKEN, visit https://api-console.zoho.com/ and choose the self client option. Copy the Client ID, Client Secret and paste them in the below command. Please give Site24x7.account.All,Site24x7.admin.All,Site24x7.reports.All,Site24x7.operations.All,Site24x7.msp.All,Site24x7.bu.All in the scope field and click the "Create" button. Copy the generated code, paste it in the below command and execute the same.

curl https://accounts.zoho.com/oauth/v2/token
-X POST
-d "client_id=<CLIENT_ID>"
-d "client_secret=<CLIENT_SECRET>"
-d "code=<GENERATED_CODE>"
-d "grant_type=authorization_code" --insecure

Command output will be similar to the one below

{"access_token":"1000.sdfsdf.sdfsdf","refresh_token":"1000.asdqwewqe.qweqwe","api_domain":"https://www.zohoapis.com","token_type":"Bearer","expires_in":3600}

In your terraform file, please configure the client ID, client secret and refresh token in the above command output.

Please let us know if you face any issues.

Note: Domain names vary based on your data center

Thanks & Regards,
Jim

@jim-billy-zoho
Copy link
Collaborator

Hi @krdawid,

Can you enable debugging and then run "terraform apply". Please copy and send us your command prompt output to support@site24x7.com along with your terraform file.
To enable debugging, execute the below command.

  • export TF_LOG=trace

Thanks & Regards,
Jim

@jim-billy-zoho
Copy link
Collaborator

Can you please change data_center = "Europe" to data_center = "EU"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants