Digilocker 2.0 Get Scope
Introduction
Get Scope API is specifically tailored to accept a request ID, which is generated by our Create URL API. Upon receiving this request ID, the API retrieves a list of files to which your end customers have granted their consent to access.
API details
Endpoint
https://api.signzy.app/api/v3/digilocker-v2/getScopePOST https://api-preproduction.signzy.app/api/v3/digilocker-v2/getScopeRequest headers
Name | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Mandatory | The type of content that the request body contains. |
Authorization | XXXXXXXXXXXXXXX | Mandatory | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |
Request body parameters
Parameter | Data Type | Description | Required |
|---|---|---|---|
requestId | String | Unique ID allocated after the authorization in digilocker iframe. This is returned as requestId in Create URL API. | Mandatory |
{
"requestId": "65797035c4f51c00108aec41"
}Code samples
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api-preproduction.signzy.app/api/v3/digilocker-v2/getScope"
method := "POST"
payload := strings.NewReader(`{
"requestId": "65797035c4f51c00108aec41"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "<Your access token>")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}Response body parameters
Parameter | Data Type | Description |
|---|---|---|
result | Object | Contains the result of the task being performed. |
result.scope | Array of Strings | Contains the list of files/data for which the end customer has given consent. |
{
"result": {
"scope": [
"files.issueddocs",
"issued/in.gov.uidai-ADHAR-XXXXXXXXXX",
"issued/in.gov.pan-PANCR-XXXXX0000X",
"userdetails",
"email",
"picture"
]
}
}Contact Us for Any Assistance
If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at [email protected]. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.
We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!