Authenticate
1 min
POST
https://openapi.sine.co/v1/api/oauth2/token
Header Parameters
- x-sine-team-idstring<uuid>requiredDescriptionFormatuuid
Form Parameters
- grant_typestringExampleDescription
- client_idstringExampleDescription
- client_secretstringExampleDescription
Responses
200
- object
- token_typestringExampleDescription
- access_tokenstringExampleDescription
- expires_innumberExampleDescription
400
- object
- codestringExampleDescription
- messagestringExampleDescription
500
- objectExample
{ "code": "INTERNAL_SERVER_ERROR", "message": "Something went wrong, please try again later" }- codestringExampleDescription
- messagestringExampleDescription
curl
curl --request POST \
--url https://openapi.sine.co/v1/api/oauth2/token \
--header 'accept: application/json' \
--header 'x-sine-team-id: string<uuid>'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/x-www-form-urlencoded");
myHeaders.append("x-sine-team-id", "string<uuid>");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://openapi.sine.co/v1/api/oauth2/token", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
url = "https://openapi.sine.co/v1/api/oauth2/token"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/x-www-form-urlencoded',
'x-sine-team-id': 'string<uuid>'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"token_type": "Bearer",
"access_token": "SHJcJf76hWBjoW3FMywUZ2xKMQ7rYQ6e",
"expires_in": 120
}400
// Bad request
{
"code": "BAD_REQUEST",
"message": "Invalid client authentication"
}500
// Internal server error
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Something went wrong, please try again later"
}