đź““
Survey2connect
  • Introduction
    • Authentication
    • Environments
  • Authorization
    • Generate Token
    • Refresh Token
  • Responses
    • Create Response
    • Response Availability
    • Export Responses In CSV
    • Export Responses In JSON
    • Export Responses In SPSS
  • Campaigns
    • Create Survey Campaign
    • Generate Survey links
  • Surveys
    • Get Surveys
  • Tickets
    • Get Ticket
    • Get Tickets
  • Templates
    • Get Template
    • Get Templates
    • Create Template
    • Update Template
    • Delete Template
Powered by GitBook
On this page

Was this helpful?

  1. Authorization

Generate Token

For establishing any API connection, API consumer needs to initiate an Authentication request. The Authentication services checks for the credentials provided and then returns an auth token upon succe

POST https://{{env}}.survey2connect.com/v2/api/oauth/token

Path Parameters

Name
Type
Description

env*

String

Datacenter identifier for client

Request Body

Name
Type
Description

email*

String

email id of the user

password*

String

password of the user

{  "access_token": "eyJraWQiOiJzM3E1OWF2cFdIcXVKa0I0MjRpcFpqQVN0dXAzQzFkZEhVM3k2TjNZSXRjPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiI4YWY1MjY0ZS04NDY2LTQ3MDktYWM0Zi1lYmUwMWNiZTQzMWYiLCJ6b25laW5mbyI6InByb2RfYXoxIilIjoiYnJhbmRBZG1pbiIsImlhdCI6MTYzMzE2MDAzOSwiZW1haWwiOiJhbnVqLnNAc3VydmV5MmNvbm5lY3QuY29tIn0.pKK_HKNnLVcVuZktOnIRiMltJCWtJQJ5AhRTRQUJ_9EBoXCsMKZgcJ0wIJP2NBLfs34bNZt8gmjOW9EZ0dawBYvXcbDLIYL05unx9A-07cpjLPUTk3BqwxmbnIc753kXR_cefKFcxFk4rm7aUQ4XhAmLC1cFX-V6COmavlfkZJAxW-PMeHFRbNxRv01t6NYfB8ksB5pVkZEmuRaOp9jvXPxSY38MRg", 
   "token_type": "bearer", 
   "expires_in": 86400, 
   "refresh_token": "eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.cDxAdRucchD9kzma3UMJ_nP4hrNdbxLIGrk2B31r1Vcqyhs3tQ0pBdAPJZj7VQJoslf-GyPXWC6RXE6AND_A021hGilxbyvc32kjY5lN33IPwmcNVzcbTh03wM-3GXxjx5gfgzicz5eXfjaKOa5W8oeklM5cX2QXt2hfbgH6yqZ2h9O9HbFI3ty2bCIRFXdKgclY6xc7iY7_mXbkazNCaENFSP0Y2W4_bPgdUJCHQVh3SOPgvU6KIjFdksUx4duZET1oYQ5ajNotTZhx6zy_r8EkIZt1rSDLqYxrhQpZkzZ-rptYzBgTfqwhINX1-2FK1U_P0eVsZZSWnruzTKxJ2jsPrkPijKewLiMOO_UlHgqgnWkoFupav3ZkG19OpLouC0oJ9s7qQYG2mcgdCnM4aukwIX.XJe6s_zXjMsfFi-VEtVaCw",  
   "created_at": 1633160039478
}
{       
    "error":{
          "name":"bad request",     
          "message": "Email is required."
       }
}
{
  "error": {
    "name": "unauthorized",
    "message": "email not verified"
  }
}
{
  "error": {
    "name": "internal server error",
    "message": "We couldn’t process your request"
  }
}
{
  "error": {
    "name": "not found",
    "message": "user not found"
  }
}
PreviousAuthorizationNextRefresh Token

Last updated 3 years ago

Was this helpful?