Generate Refresh Token
In most cases a refresh token is already present when you View a User. In instances where a refresh token is not avaliable, it can be generated by using a Basic Auth by supplying the user's username and password. These combinations exist in the logins
object of the user. Go to User Object Details to learn more.
Login
POST
https://api.synapsefi.com/v3.1/oauth/:user_id/login
This endpoint allows you to generate a refresh token for the user linked to your client credentials.
Path Parameters
user_id
string
ID of the user you wish to generate an OAuth token for.
Headers
X-SP-USER
string
OAuth key and device fingerprint of the user separated by a pipe. In this API call, only the device fingerprint is required.
X-SP-USER-IP
string
IP Address of the user device.
X-SP-GATEWAY
string
Your Client ID and Secret separated by a pipe.
Request Body
string
Email associated with the user login object.
password
string
Password associated with the same user login object.
{
"_id": "5fd7acfe462ea84c7f58b822",
"_v": 2,
"change_in": 8,
"client_id": "589acd9ecb3cd400fa75ac06",
"client_name": "SynapseFi",
"fp_registered": false,
"is_active": true,
"refresh_token": "refresh_EXexC9GsR4o35jO7lIrKhWVcZv6PmAzYpQfFtU0i",
"scope": [
"USER|PATCH",
"USER|GET",
"NODES|POST",
"NODES|GET",
"NODE|GET",
"NODE|PATCH",
"NODE|DELETE",
"TRANS|POST",
"TRANS|GET",
"TRAN|GET",
"TRAN|PATCH",
"TRAN|DELETE",
"SUBNETS|POST",
"SUBNETS|GET",
"SUBNET|GET",
"SUBNET|PATCH",
"STATEMENTS|GET",
"STATEMENT|GET",
"STATEMENTS|POST",
"CONVERSATIONS|POST",
"CONVERSATIONS|GET",
"CONVERSATION|GET",
"CONVERSATION|PATCH",
"MESSAGES|POST",
"MESSAGES|GET",
"MESSAGE|GET",
"MESSAGE|PATCH"
],
"user_id": "5fd7acfd8677040053ad486d"
}
Example Request
POST /v3.1/oauth/5fd7acfd8677040053ad486d/login HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_6zZVr8biuqGkyo9IxMO5jY2QlSp0nmD4EBAgKcJW
X-SP-USER-IP: 255.127.79.76
X-SP-USER: |e83cf6ddcf778e37bfe3d48fc78a6502062fc22
Content-Type: application/json
{
"email": "[email protected]",
"password":"test1234"
}
Last updated
Was this helpful?