{"_id":"5b27be394799c70003f3638a","project":"57336fd5a6a9c40e00e13a0b","version":{"_id":"5b197473be7bb50003d5dbd6","project":"57336fd5a6a9c40e00e13a0b","__v":2,"forked_from":"5addf90f94fe9d0003cd9d29","createdAt":"2018-04-23T15:17:35.680Z","releaseDate":"2018-04-23T15:17:35.680Z","categories":["5b197473be7bb50003d5db9c","5b197473be7bb50003d5db9d","5b197473be7bb50003d5db9e","5b197473be7bb50003d5db9f","5b197473be7bb50003d5dba0","5b197473be7bb50003d5dba1","5b197473be7bb50003d5dba2","5b197473be7bb50003d5dba3","5b197473be7bb50003d5dba4","5b197473be7bb50003d5dba5","5b197473be7bb50003d5dba6","5b27bded4799c70003f36389","5b34c737e0dca2000311de6a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.26 Release","version_clean":"8976.0.0-Tools","version":"8976-Tools"},"category":{"_id":"5b27bded4799c70003f36389","project":"57336fd5a6a9c40e00e13a0b","version":"5b197473be7bb50003d5dbd6","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-06-18T14:13:01.902Z","from_sync":false,"order":11,"slug":"merchant-single-signon","title":"User Management"},"user":"5b155c2c3fbcd30003e76908","__v":75,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-18T14:14:17.282Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"57ee593a21ceb20e0061959e","examples":{"codes":[]},"method":"post","auth":"optional","params":[],"url":""},"isReference":false,"order":3,"body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/generateSSOLoginToken/<userId>?onbehalfofmid=</span>\n\n<hr>\n\n##Documentation\n\nThe Generate SSO Token API allows you to provide your user with single sign-on access to the BlueSnap Console. Use the URL in the API response to redirect the browser to the BlueSnap Console.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note:\",\n  \"body\": \"Contact your e-support team (team who customized your merchant setup) to have them apply your principal role, so you can use this function.\"\n}\n[/block]\n###Request Content\n\nSend a JSON object, with the following:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`requestingUserIp` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>\n\n###Response Details\n\nIf successful, the response HTTP status code is 200 OK.\n\n<hr>\n\n##Examples\n\n###Request Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/generateSSOLoginToken/1111001 \\\\\\n-H 'Content-Type: application/json' \\n-H 'Accept: application/json' \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='\\n{\\n\\t\\\"requestingUserIp\\\": \\\" 62.216.234.216\\\"\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"Generate SSO Token\"\n    },\n    {\n      \"code\": \"curl -v -X POST https://sandbox.bluesnap.com/services/2/generateSSOLoginToken/1111001?onbehalfofmid=23424 \\\\\\n-H 'Content-Type: application/json' \\n-H 'Accept: application/json' \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='\\n{\\n\\t\\\"requestingUserIp\\\": \\\" 62.216.234.216\\\"\\n}\",\n      \"language\": \"curl\",\n      \"name\": \"Generate SSO Token on behalf of linked BlueSnap account\"\n    }\n  ]\n}\n[/block]\n###Response Example\n\nIf successful, the response HTTP status code is 200 OK.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\\"loginToken\\\":\\\"44707702fb720f7be383722b5e767a77e78.-xn_70978e720abbc80e383722b5e767a77e78.-xn_70978e720abbc8070978e720abbc80e383722b5e767a77e78.-xn_70978e720abbc80\\\",\\n\\t\\\"loginLink\\\":\\n\\\"https://bluesnap.com/jsp/developer_login.jsp?ref=44707702fb720f7be383722b5e767a77e78.-xn_70978e720abbc80e383722b5e767a77e78.-xn_70978e720abbc8070978e720abbc80e383722b5e767a77e78.-xn_70978e720abbc80\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Generate SSO Token Response: 200 OK\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Note\",\n  \"body\": \"* Each session only remains active for 30 minutes. When a session expires, the data *is not* saved and you must create a new login request to activate a new session. \\n* If the session was closed while working, you need to create a new login token since BlueSnap does not maintain the status of lost sessions.\"\n}\n[/block]\n##Example Descriptions\n\nFor details about the above examples, see:\n\n* [Generate SSO Token](https://developers.bluesnap.com/v8976-Tools/docs/generate-sso-token-api#section-generate-sso-token)\n* [Generate SSO Token on behalf of linked BlueSnap account](https://developers.bluesnap.com/v8976-Tools/docs/generate-sso-token-api#section-generate-sso-token-on-behalf-of-linked-bluesnap-account)\n\n###Generate SSO Token\nThis example shows a Generate SSO Token request with the `requestingUserIp` value set. You will want to use this value to generate an SSO token for your user.\n\n###Generate SSO Token on behalf of linked BlueSnap account\nThis example shows a Generate SSO Token request on behalf of a linked BlueSnap account.\n\n###Parameter Reference \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-1\": \"Creates SSO Token on behalf of a linked BlueSnap account\\n\\n**Note:** This parameter specifies the BlueSnap account that owns the user.\",\n    \"0-0\": \"onbehalfofmid\",\n    \"1-0\": \"userId\",\n    \"2-0\": \"requestingUserIp\",\n    \"1-1\": \"Provided in the Create User API response\",\n    \"2-1\": \"Consists of user's IP address; for example, 62.216.234.216\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]","excerpt":"After creating your user, you can provide them with single sign-on access.","slug":"generate-sso-token-api","type":"endpoint","title":"Generate SSO Token"}

postGenerate SSO Token

After creating your user, you can provide them with single sign-on access.

Definition

https://sandbox.bluesnap.com/services/2/generateSSOLoginToken/<userId>?onbehalfofmid=


Documentation

The Generate SSO Token API allows you to provide your user with single sign-on access to the BlueSnap Console. Use the URL in the API response to redirect the browser to the BlueSnap Console.

Note:

Contact your e-support team (team who customized your merchant setup) to have them apply your principal role, so you can use this function.

Request Content

Send a JSON object, with the following:

      requestingUserIp     string    required

Response Details

If successful, the response HTTP status code is 200 OK.


Examples

Request Example

curl -v -X POST https://sandbox.bluesnap.com/services/2/generateSSOLoginToken/1111001 \
-H 'Content-Type: application/json' 
-H 'Accept: application/json' 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
{
	"requestingUserIp": " 62.216.234.216"
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/generateSSOLoginToken/1111001?onbehalfofmid=23424 \
-H 'Content-Type: application/json' 
-H 'Accept: application/json' 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
{
	"requestingUserIp": " 62.216.234.216"
}

Response Example

If successful, the response HTTP status code is 200 OK.

{
"loginToken":"44707702fb720f7be383722b5e767a77e78.-xn_70978e720abbc80e383722b5e767a77e78.-xn_70978e720abbc8070978e720abbc80e383722b5e767a77e78.-xn_70978e720abbc80",
	"loginLink":
"https://bluesnap.com/jsp/developer_login.jsp?ref=44707702fb720f7be383722b5e767a77e78.-xn_70978e720abbc80e383722b5e767a77e78.-xn_70978e720abbc8070978e720abbc80e383722b5e767a77e78.-xn_70978e720abbc80"
}

Note

  • Each session only remains active for 30 minutes. When a session expires, the data is not saved and you must create a new login request to activate a new session.
  • If the session was closed while working, you need to create a new login token since BlueSnap does not maintain the status of lost sessions.

Example Descriptions

For details about the above examples, see:

Generate SSO Token

This example shows a Generate SSO Token request with the requestingUserIp value set. You will want to use this value to generate an SSO token for your user.

Generate SSO Token on behalf of linked BlueSnap account

This example shows a Generate SSO Token request on behalf of a linked BlueSnap account.

Parameter Reference

Parameter
Description

onbehalfofmid

Creates SSO Token on behalf of a linked BlueSnap account

Note: This parameter specifies the BlueSnap account that owns the user.

userId

Provided in the Create User API response

requestingUserIp

Consists of user's IP address; for example, 62.216.234.216