Go to All Forums

[Self Client] URi to generate the session code

Hi

There is a URi that I can use to generate the session code for Self Client?

Like this one without the redirect_uri?

 

accounts.zoho.com/oauth/v2/auth?response_type=code&client_id=<clientid>&scope=AaaServer.profile.Read&redirect_uri=www.zylker.com/oauthredirect%26prompt=consent
Like (3) Reply
Replies (5)

Hi Rogerio,
    You don't need to pass any redirect_uri for self client, it is only required for client-based, server-based and mobile based oauth applications. Please refer our help doc for more information and examples.

Regards,
Karthick

Like (0) Reply

Hi Karthick and thanks for your response.
I read the documentation and asked help to technical support searching for the answer to the question 'There is a URi that I can use to generate the code for Self Client?', and in the both channel I haven't find the answer.
English is not my native language so let me known if I'm beeing misunderstood.
There is a way to generate the code dinamycally for Self Client using a URi?

Like (0) Reply

Rogerio,
     There is no URI to generate code for self client, however once you have generated the code you can generate Refresh token and Access token using it with the following URIs.

Refresh Token Example:

$ curl  https://accounts.zoho.com/oauth/v2/token \
        -X POST \
        -d "client_id=1000.0SRSZSY37WMZ69405H3TMYI2239V" \
        -d "client_secret=fb0196010f2b70df8db2a173ca2cf59388798abf"\
        -d "code=1000.dd7e47321d48b8a7e312e3d6eb1a9bb8.b6c07ac766ec11da98bf6a261e24dca4"\
        -d "grant_type=authorization_code" \

 

Access Token Example:

$ curl https://accounts.zoho.com/oauth/v2/token \
        -X POST \
        -d "client_id=1000.0SRSZSY37WMZ69405H3TMYI2239V" \
        -d "client_secret=fb0196010f2b70df8db2a173ca2cf59388798abf" \
        -d "refresh_token=1000.8ecd474019e31d52d2f94aad6c5cb7.4638677ebc14f2f2ee0b6dfb6cebdc"\
        -d "grant_type=refresh_token" \


Regards,
Karthick

Like (0) Reply

Is this the only way to generate the authorization code?
I will be using the Self Client to authenticate and authorize Terraform to provision monitors. But the manual step to generate the code defeats the purpose of automating the provisioning of our infrastructure.

Like (0) Reply

Site24x7 supports automatic regeneration of access tokens using the refresh token. You don’t need to manually generate the authorization code every time.

Once you obtain the initial authorization code and exchange it for an access token and refresh token, you can use the refresh token to dynamically regenerate access tokens without manual intervention.

Regards, 
Vinoth K. 

Like (0) Reply

Was this post helpful?