Hello Support,
I bought the ApiBuilder plugin and configured everything explained in video and created api. Now I am trying to execute it with secret key but it always throwing error {"error":"token_not_provided"} Please suggest what is going wrong. Regards, Rakesh Jha
Hi, you need to provide token as a query param like example below: Create new model (POST)
POST /api/v1/events?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3QvYXBpL2xvZ2luIiwiaWF0IjoxNTg1NDA4MDUxLCJleHAiOjE1ODU0MTE2NTEsIm5iZiI6MTU4NTQwODA1MSwianRpIjoiSnNrWUtnWVIxcThYS3pJcyJ9.8i2VI1Edn4sZAXMu9j6a7ZjB6FzppeRqoPp1OI3Tw1c HTTP/1.1
Content-Type: application/json
{
"description": "hello world",
"price": 110,
"event_date": "2020-05-08 14:00:00"
}
Hello, I am doing the same but getting error "{"error":"token_not_provided"}"
Please see below api call
Please let me know how this can be fixed?
Last updated
Hi You are getting the error because the token structure of ur token is wrong. The token structure expected is: string1.string2.string3
If you try the link below, you will invalid token error:
You need to login to the api to get a valid token and then use that token for your subsequent requests.
POST /projects/api/login
{
"email": "use@domain.com",
"password": "password"
}
Then you will receive a token like the one below:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjMsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3QvcHJvZC9hcGkvbG9naW4iLCJpYXQiOjE2MTY1OTE5OTksImV4cCI6MTYxNjU5NTU5OSwibmJmIjoxNjE2NTkxOTk5LCJqdGkiOiJrbzkyRXljZ3NjNGx2NzhGIn0.8DWo52GGnrj0ueq2r8cquF5_29mQ4G7Cbp4rK_McpXE
This token has three parts separated by dots/period/full stop
Hello, Thank you for the quick response. I am trying to run login api as per your suggestion but getting "Auth guard [] is not defined."
Please suggest the solution.
Hello
It seems you have other issues. You are welcome to contact me directly for further assistance. I'll be happy to help.
1-6 of 6