Authenticate
1 min
code examples curl request post \\ \ url https //openapi sine co/v1/api/oauth2/token \\ \ header 'accept application/json' \\ \ header 'x sine team id string\<uuid>'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));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) responses // ok { "token type" "bearer", "access token" "shjcjf76hwbjow3fmywuz2xkmq7ryq6e", "expires in" 120 }// bad request { "code" "bad request", "message" "invalid client authentication" }// internal server error { "code" "internal server error", "message" "something went wrong, please try again later" }